CodeQL
GitHub's semantic code analysis: code becomes a database, queries do interprocedural taint tracking.
github.com/github/codeql ↗- Stars
- ★ 10,277
- License
- MIT
- Language
- CodeQL
- Latest release
- No releases
- Last push
- 30 Oct 2026
- OpenSSF Scorecard
- 5.8 / 10
The deepest analysis here and built into GitHub, but slow and only free for public repositories.
Note: this page is AI generated. Read the tool's own repository and documentation, linked at the bottom, before you rely on it.
How it works
CodeQL first extracts a relational database from the code. For compiled languages it watches the build, for others it reads the source. Queries written in QL then run against that database, with libraries for interprocedural dataflow and taint tracking from sources (request data, event fields) to sinks (queries, shells, file paths).
On GitHub you turn it on with default setup in the repository settings or with github/codeql-action in a workflow, and results appear as code scanning alerts on PRs. Since April 2025 it also analyzes GitHub Actions workflows for injection, missing permissions and untrusted checkouts.
The queries in github/codeql are MIT licensed. The CLI and engine are under the GitHub CodeQL Terms: free for open source and research, and for private repositories it needs GitHub Code Security.
What it catches
- Injection and path traversal across function and file boundaries
- Unsafe deserialization and SSRF
- Script injection and untrusted checkout in Actions workflows
- Custom variant analysis written as your own queries
Run it
gh extension install github/gh-codeql
gh codeql database create db --language=javascript
gh codeql database analyze db --format=sarif-latest --output=codeql.sarifWhat leaves your machine
Local analysis sends nothing. On GitHub, results are uploaded as code scanning alerts.
Limits
- Analysis takes minutes to an hour on large codebases.
- Private repositories need a paid GitHub Code Security license.
- Writing QL queries is a skill of its own.
Links
Related tools
Related incidents
GitHub stats as of 30 Oct 2026. How ratings work.