CodeQL 2.24.0 (2026-01-26)¶
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.24.0 runs a total of 491 security queries when configured with the Default suite (covering 166 CWE). The Extended suite enables an additional 135 queries (covering 35 more CWE).
CodeQL CLI¶
Miscellaneous¶
The OWASP Java HTML Sanitizer library used by the CodeQL CLI for internal documentation generation commands has been updated to version 20260102.1.
The build of Eclipse Temurin OpenJDK that is used to run the CodeQL CLI has been updated to version 21.0.9.
Query Packs¶
Major Analysis Improvements¶
JavaScript/TypeScript¶
JavaScript files with an average line length greater than 200 are now considered minified and will no longer be analyzed. For use-cases where minified files should be analyzed, the original behavior can be restored by setting the environment variable
CODEQL_EXTRACTOR_JAVASCRIPT_ALLOW_MINIFIED_FILES=true.
Minor Analysis Improvements¶
C/C++¶
The
cpp/constant-comparisonquery has been updated to not produce false positives for constants that are now represented by their unfolded expression trees.
C#¶
Added
NHibernate.ISession.CreateSQLQuery,NHibernate.IStatelessSession.CreateSQLQueryandNHibernate.Impl.AbstractSessionImpl.CreateSQLQueryas SQL injection sinks.The
Missing cross-site request forgery token validationquery was extended to support ASP.NET Core.
Java/Kotlin¶
Added sink models for
com.couchbasesupporting SQL Injection and Hardcoded Credentials queries.Java thread safety analysis now understands initialization to thread safe classes inside constructors.
JavaScript/TypeScript¶
The model of
vue-routernow properly detects taint sources in cases where thepropsproperty is a callback.Fixed a bug in the Next.js model that would cause the analysis to miss server-side taint sources in files named
routeorpageappearing outsideapiandpagesfolders.new Response(x)is no longer seen as a reflected XSS sink when nocontent-typeheader is set, since the content type defaults totext/plain.
Rust¶
Fixed common false positives for the
rust/unused-variableandrust/unused-valuequeries.Fixed false positives from the
rust/access-invalid-pointerquery, by only considering dereferences of raw pointers as sinks.Fixed false positives from the
rust/access-after-lifetime-endedquery, involving calls to trait methods.The
rust/hard-coded-cryptographic-valuequery has been extended with new heuristic sinks identifying passwords, initialization vectors, nonces and salts.
Query Metadata Changes¶
C#¶
Updated the
name,description, and alert message ofcs/path-combineto have more details about why it’s a problem.
Language Libraries¶
Bug Fixes¶
C/C++¶
Fixed a bug in the
DataFlow::BarrierGuard<...>::getABarrierNodepredicate which caused the predicate to returnDataFlow::Nodes with incorrect indirections. If you usegetABarrierNodeto implement barriers in a dataflow/taint-tracking query it may result in more query results. You can useDataFlow::BarrierGuard<...>::getAnIndirectBarrierNodeto remove those query results.
C#¶
Fixed two issues affecting build mode
none:Corrected version sorting logic when detecting the newest .NET framework to use.
Improved stability for .NET 10 compatibility.
Fixed an issue where compiler-generated files were not being extracted. The extractor now runs after compilation completes to ensure all generated files are properly analyzed.
Breaking Changes¶
C/C++¶
The
_Decimal32,_Decimal64, and_Decimal128types are no longer exposed as builtin types. Support for these gcc-specific types was incomplete, and are generally not used in C/C++ codebases.
Golang¶
The query
go/unexpected-frontend-errorhas been moved from thecodeql/go-queriesquery to thecodeql-go-consistency-queriesquery pack.
Python¶
All modules that depend on the points-to analysis have now been removed from the top level
python.qllmodule. To access the points-to functionality, import the newLegacyPointsTomodule. This also means that some predicates have been removed from various classes, for instanceFunction.getFunctionObject(). To access these predicates, import theLegacyPointsTomodule and use theFunctionWithPointsToclass instead. Most cases follow this pattern, but there are a few exceptions:The
getLiteralObjectmethod onImmutableLiteralsubclasses has been replaced with a predicategetLiteralObject(ImmutableLiteral l)in theLegacyPointsTomodule.The
getMetricsmethod onFunction,Class, andModulehas been removed. To access metrics, importLegacyPointsToand use the classesFunctionMetrics, etc. instead.
Major Analysis Improvements¶
Swift¶
Upgraded to allow analysis of Swift 6.2.3.
Upgraded to allow analysis of Swift 6.2.2.
GitHub Actions¶
The query
actions/code-injection/mediumhas been updated to include results which were incorrectly excluded while filtering out results that are reported byactions/code-injection/critical.
Minor Analysis Improvements¶
C/C++¶
Some constants will now be represented by their unfolded expression trees. The
isConstantpredicate ofExprwill no longer yield a result for those constants.
C#¶
When a code-scanning configuration specifies the
paths:and/orpaths-ignore:settings, these are now taken into account by the C# extractor’s search for.config,.props, XML and project files.Updated the generated .NET “models as data” runtime models to cover .NET 10.
C# 14: Support for implicit span conversions in the QL library.
Basic extractor support for .NET 10 is now available. Extraction is supported for .NET 10 projects in both traced mode and
build mode: none. However, code that uses language features new to C# 14 is not yet fully supported for extraction and analysis.Added autobuilder and
build-mode: nonesupport for.slnxsolution files.In
build mode: none, .NET 10 is now used by default unless a specific .NET version is specified elsewhere.Added implicit reads of
System.Collections.Generic.KeyValuePair.Valueat taint-tracking sinks and at inputs to additional taint steps. As a result, taint-tracking queries will now produce more results when a container is tainted.
Golang¶
When a code-scanning configuration specifies the
paths:and/orpaths-ignore:settings, these are now taken into account by the Go extractor’s search for.vueand HTML files.
Java/Kotlin¶
When a code-scanning configuration specifies the
paths:and/orpaths-ignore:settings, these are now taken into account by the Java extractor’s search for XML and properties files.Additional remote flow sources from the
org.springframework.web.socketpackage have been modeled.A sanitizer has been added to
java/ssrfto remove alerts when a regular expression check is used to verify that the value is safe.URI template variables of all Spring
RestTemplatemethods are now considered as request forgery sinks. Previously only thegetForObjectmethod was considered. This may lead to more alerts for the queryjava/ssrf.Added more dataflow models of
org.apache.commons.fileupload.FileItem,javax/jakarta.servlet.http.Partandorg.apache.commons.fileupload.util.Streams.
JavaScript/TypeScript¶
Support
use cachedirectives for Next.js 16.Added
PreCallGraphStepflow model for React’suseRefhook.Added a
DomValueSourcethat uses thecurrentproperty off the object returned by React’suseRefhook.
Python¶
When a code-scanning configuration specifies the
paths:and/orpaths-ignore:settings, these are now taken into account by the Python extractor’s search for YAML files.The
compression.zstdlibrary (added in Python 3.14) is now supported by thepy/decompression-bombquery.Added taint flow model and type model for
urllib.parse.Remote flow sources for the
python-socketiopackage have been modeled.Additional models for remote flow sources for
tornado.websocket.WebSocketHandlerhave been added.
Rust¶
The
Dereftrait is now considered during method resolution. This means that method calls on receivers implementing theDereftrait will correctly resolve to methods defined on the target type. This may result in additional query results, especially for data flow queries.Renamed the
Adtclass toTypeItemand moved common predicates fromStruct,Enum, andUniontoTypeItem.Added models for the Axum web application framework.
Reading content of a value now carries taint if the value itself is tainted. For instance, if
sis tainted thens.fieldis also tainted. This generally improves taint flow.The call graph is now more precise for calls that target a trait function with a default implementation. This reduces the number of false positives for data flow queries.
Improved type inference for raw pointers (
*constand*mut). This includes type inference for the raw borrow operators (&raw constand&raw mut) and dereferencing of raw pointers.
Deprecated APIs¶
C/C++¶
The
OverloadedArrayExpr::getArrayOffset/0predicate has been deprecated. UseOverloadedArrayExpr::getArrayOffset/1andOverloadedArrayExpr::getAnArrayOffsetinstead.
New Features¶
C/C++¶
Added subclasses of
BuiltInOperationsfor the__is_bitwise_cloneable,__is_invocable, and__is_nothrow_invocablebuiltin operations.Added a
isThisAccesspredicate toParamAccessForTypethat holds when the access is to the implicit object parameter.Predicates
getArrayOffset/1andgetAnArrayOffsethave been added to theOverloadedArrayExprclass to support C++23 multidimensional subscript operators.
Python¶
The extractor now supports the new, relaxed syntax
except A, B, C: ...(which would previously have to be written asexcept (A, B, C): ...) as defined in PEP-758. This may cause changes in results for code that uses Python 2-style exception binding (except Foo, e: ...). The more modern format,except Foo as e: ...(available since Python 2.6) is unaffected.The Python extractor now supports template strings as defined in PEP-750, through the classes
TemplateStringandJoinedTemplateString.