CodeQL 2.27.5 (2026-11-19)¶
This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the code scanning section on the GitHub blog, relevant GitHub Changelog updates, changes in the CodeQL extension for Visual Studio Code, and the CodeQL Action changelog.
Security Coverage¶
CodeQL 2.27.5 runs a total of 499 security queries when configured with the Default suite (covering 169 CWE). The Extended suite enables an additional 131 queries (covering 32 more CWE). 1 security query has been added with this release.
CodeQL CLI¶
Breaking Changes¶
The C/C++ extractor no longer supports Brotli compression. Users invoking the extractor directly should replace
--trap-compression=brotlior--tar-entry-compression=brotliwith the correspondingzstdoption. The--brotli-qualityoption has also been removed.
Bug Fixes¶
When choosing the default queries for a language whose extractor is found on
--search-path, the CLI now uses the extractor’sdefault_queriesproperty instead ofcodeql/<language>-queries.codeql test runnow accepts.qlrefconsistency queries passed via--consistency-queriesas it already does for ordinary unit tests, and applies the same.qlrefprecedence: if a.qlfile has a synonymous.qlreffile, the.qlreffile is resolved and run instead, and the.qlfile is skipped.
Security Updates¶
When invoked by
codeql test run, extractors for XML, YAML, and Java.propertiesfiles run in a mode that traverses the source root directory and extracts all relevant files. This mode has been updated so that it no longer follows symbolic links.
QL Language¶
The
stringtype now has built-in member predicatesstartsWith(string prefix),endsWith(string suffix), andcontains(string substring). These perform case-sensitive matching of literal strings, without wildcards or regular expressions. All three predicates hold for an empty argument.
Query Packs¶
Minor Analysis Improvements¶
C/C++¶
The
cpp/cleartext-transmissionandcpp/cleartext-storage-filequeries now track flow through character types. As a result, these queries may find additional results.The
cpp/unused-static-variablequery no longer reports compiler-generated variables, such as placeholders for empty function parameter packs.The
cpp/unused-local-variableandcpp/unused-static-variablequeries no longer report variables whose initializers may have side effects.The
cpp/missing-check-scanfquery produces fewer false positives when an unaliased local output variable is overwritten with a default value if ascanf-like call fails.
Golang¶
Added value flow models for functions in the
mapspackage which do not involve theiterpackage.
Java/Kotlin¶
The
java/local-variable-is-never-readquery no longer reports unnamed variables (_), for example incase Foo _ ->patterns,for (var _ : items)loops, andvar _ = ...;declarations.
JavaScript/TypeScript¶
The
js/command-line-injectionquery now reports remote input that reaches argument arrays when theshelloption is enabled. Thejs/shell-command-constructed-from-inputquery also recognizes string-valued shell paths. Both queries now handleexecFilecalls without a callback and check argument-array input at the execution call, avoiding alerts for later array mutations.Valid arguments passed to the
StorageEventconstructor no longer produce alerts fromjs/superfluous-trailing-arguments.
New Queries¶
Rust¶
Added a new query,
rust/unsafe-deserialization, to detect deserialization of user-controlled data.
Language Libraries¶
Breaking Changes¶
Golang¶
The Go SSA API now uses the shared SSA classes (
SsaDefinition,SsaWriteDefinition,SsaExplicitWrite,SsaParameterInit,SsaImplicitWrite,SsaUncertainWrite, andSsaPhiDefinition):SsaVariable,SsaExplicitDefinition,SsaImplicitDefinition,SsaVariableCapture,SsaPseudoDefinition, andSsaPhiNodehave been deprecated.ControlFlow::WriteNode.definesSsaVariable,IR::WriteTarget.asSsaVariable,SsaWithFields.getBaseVariable, andDataFlow::ReadNode.readsSsaVariablehave been deprecated in favor ofdefinesSsaDefinition,asSsaDefinition,getBaseDefinition, andreadsSsaDefinition, respectively.SsaDefinitionno longer definesgetVariable(),getRoot(), orhasLocationInfo(...). UseSsaDefinitiondirectly,getBasicBlock().getScope(), andgetLocation().hasLocationInfo(...)instead.SsaDefinition.getAFirstUse()is no longer available. First-use access remains available throughgetAFirstUse()on the deprecatedSsaVariableclass.DataFlow::ReadNode.readsSsaDefinition()matches all reads, not just first uses, and is not an equivalent replacement.SsaDefinition.getARead()returns expression reads only. UseDataFlow::ReadNode.readsSsaDefinition()to include implicit reads, such as reads of result variables at function exit.IR::TypeSwitchImplicitVariableInstructionnow extendsIR::WriteInstruction, with target classIR::ImplicitVariableTarget.
Minor Analysis Improvements¶
C#¶
Added support for data flow through property patterns in
isexpressions andswitchcases.
Java/Kotlin¶
Added taint flow model for
reactor.core.publisher.Mono<T>.The
java/weak-cryptographic-algorithm,java/potentially-weak-cryptographic-algorithm, andjava/rsa-without-oaepqueries now match cryptographic algorithm names and modes case-insensitively (for example,AES/CBC/PKCS5PADDINGandAES/cbc/Pkcs5Padding).Java taint-tracking queries now recognize equality and case-insensitive equality checks against fixed string constants as sanitizers. The queries
java/ssrfandjava/unvalidated-url-redirectionalso recognize checks ofURI.getHost()against fixed collections of strings, including when the host is normalized to upper or lower case.
JavaScript/TypeScript¶
Checks of the form
isNaN(parseInt(x))andisNaN(parseFloat(x))are no longer treated as checking thatxis a number, sinceparseIntandparseFloatonly validate a numeric prefix ofx. This can reveal previously missed alerts, for example fromjs/shell-command-constructed-from-inputandjs/unsafe-jquery-plugin.The command injection queries now properly recognize argument arrays passed to
spawnandexecFileas sinks when theshelloption is enabled.The sensitive data heuristics treat names built on
trusted_schema, such as SQLite’sset_trusted_schemasetting, as non-sensitive. This removes false positive results from queries that use the sensitive data library (for examplejs/clear-text-logging).Regular expression checks using multiline (
m) or unknown flags are no longer treated as generic taint sanitizers just because the pattern is anchored with^and$. This can reveal previously missed alerts, including command injection and reflected cross-site scripting.Added modeling of the
@modelcontextprotocol/sdkand@modelcontextprotocol/server(the official Model Context Protocol SDK) andfastmcpnpm packages. The arguments of MCP tool, resource and prompt callbacks and the requests that handlers of the low-levelServerreceive are now sources of the opt-inaithreat model, as their values are produced by a language model. The request headers and the bearer token that the SDK passes to a callback are sources of theremotethreat model.Added flow summaries for schema parsing with the
zodnpm package: data now flows from the argument ofparse,safeParse,parseAsyncandsafeParseAsyncto the parsed result.
Python¶
The
py/tarslipquery now uses the correct argument positions and parameter names forTarFile.extractandTarFile.extractallsinks, reportingextract(member=...)calls with untrusted members and no longer falsely reportingextractall(path, members)calls when sanitizedmembersare passed positionally.Await expressions are now treated as having side effects. This prevents false positives from the “Statement has no effect” query (
py/ineffectual-statement) when an awaited task or coroutine’s result is discarded.The sensitive data heuristics treat names built on
trusted_schema, such as SQLite’sset_trusted_schemasetting, as non-sensitive. This removes false positive results from queries that use the sensitive data library (for examplepy/clear-text-logging-sensitive-data).Added modeling of the
mcp(the official Model Context Protocol SDK) andfastmcpPyPI packages. The parameters of MCP tool, resource and prompt handlers are now sources of the opt-inaithreat model, as their values are produced by a language model; theContextparameter that the SDKs inject is not a source. The HTTP headers thatfastmcphandlers read throughget_http_headers()orget_http_request(), and the bearer token that token verifiers (verify_token) andget_access_token()receive, are sources of theremotethreat model.Type tracking now works for values stored in instance attributes and read from outside the class (for example
instance.attrwhere the value was assigned toself.attrin a method), provided the instance at the read is reachable by local flow from a resolved constructor call. This excludes, for example, instances returned by a function and module-level instances read inside a function.
Ruby¶
The sensitive data heuristics treat names built on
trusted_schema, such as SQLite’sset_trusted_schemasetting, as non-sensitive. This removes false positive results from queries that use the sensitive data library (for examplerb/clear-text-logging-sensitive-data).
Swift¶
The sensitive data heuristics treat names built on
trusted_schema, such as SQLite’sset_trusted_schemasetting, as non-sensitive. This removes false positive results from queries that use the sensitive data library (for exampleswift/cleartext-logging).
Rust¶
The Rust AST no longer exposes
ParenExprandParenPatnodes. Parenthesized expressions and patterns are represented by their inner entities instead.The
rust/access-after-lifetime-endedquery now detects more accesses through pointers to struct fields created bystd::ptr::addr_of!andstd::ptr::addr_of_mut!.The sensitive data heuristics treat names built on
trusted_schema, such as SQLite’sset_trusted_schemasetting, as non-sensitive. This removes false positive results from queries that use the sensitive data library (for examplerust/cleartext-logging).