CodeQL 2.27.3 Adds Python 3.15 Support and JSON Data Extensions
CodeQL 2.27.3 adds Python 3.15 syntax support, JSON data extension files, C23 bit-precise integers and query accuracy fixes, with a GitHub Actions CFG breaking change.
GitHub has released CodeQL 2.27.3, the static analysis engine behind GitHub code scanning, adding support for Python 3.15 language features, JSON syntax for data extension files, and C23 bit-precise integers. According to GitHub, the release also brings accuracy improvements across several languages.
If you write custom CodeQL queries or data extensions, the JSON change is the one to note first. Data extension files can now use JSON syntax with the same structure as YAML extensions, and Java-style comments (// and /* */) are allowed. CodeQL parses files ending in .json as JSON and keeps treating everything else as YAML.
Python 3.15 and a new AI threat model
The Python extractor now handles Python 3.15 syntax, including unary plus in match literal patterns and Unicode 17 identifiers. GitHub says it also added support for the new frozendict and sentinel builtins introduced in Python 3.15, including data flow modeling for frozendict construction.
On the CLI side, there is a new opt-in ai threat model for LLM-generated data. It ships without built-in source models, so you define your own sources through data extensions.
Language-specific changes
- C/C++: support for C23 bit-precise integers (
_BitInt(N)) and flow summaries for BlazingMQ’sBloombergLP::bmqa::MessageandMessagePropertiesclasses and their iterators. - C#: data flow through positional patterns in
isexpressions and switch cases; CodeQL now passes required proxy and certificate environment variables to the NuGet CLI when private registries are configured. - Ruby: Grape::API request sub-accessors such as
body.read,params,GET,POST,cookies,env,query_stringandpath_infoare treated as remote flow sources.
Several queries get fewer false positives. The cpp/resource-not-released-in-destructor query now recognizes resources released through local aliases, and cs/simplifiable-boolean-expression is quieter when type information is incomplete. The java/ssrf and java/unvalidated-url-redirection queries now recognize case-insensitive comparisons of URI.getHost() against fixed allowlist entries, including when the host is stored in a local variable. In Python, the py/xxe, py/xml-bomb and py/nosql-injection queries respect your configured threat model and include sources modeled with data extensions.
Breaking change for GitHub Actions queries
The GitHub Actions control flow graph now uses the shared CFG library. GitHub warns that custom queries relying on specific CFG nodes, edges or basic block boundaries may need updating, and the legacy Completion classes have been removed. Use CFG edge labels such as DirectSuccessor, BooleanSuccessor and ReturnSuccessor instead.
Every new CodeQL version is automatically deployed to GitHub code scanning users on github.com. The new functionality will also ship in GitHub Enterprise Server 3.24; on older GHES versions you can upgrade your CodeQL version manually.
Related reading
Sources
- CodeQL 2.27.3 adds Python 3.15 features and JSON data extensions — GitHub Changelog
Some links on this page may be affiliate links. If you buy through them we may earn a commission at no extra cost to you. See our affiliate disclosure.