CodeQL 2.24.0 adds Swift 6.2 and .NET 10 support, and improves file handling for minified JavaScript
CodeQL is the static analysis engine behind GitHub code scanning, which finds and remediates security issues in your code. We’ve recently released CodeQL 2.24.0, which adds support for new language versions, expands framework coverage, and improves query accuracy across multiple languages.
Language and framework support
Swift
- We’ve updated CodeQL to support analysis of apps built with Swift 6.2.2 and 6.2.3.
C#
- We’ve added support for .NET 10 and C# 14.
JavaScript/TypeScript
- CodeQL now treats JavaScript files with an average line length greater than 200 as minified and won’t analyze them. For scenarios where minified JavaScript files should be analyzed, you can set the environment variable
CODEQL_EXTRACTOR_JAVASCRIPT_ALLOW_MINIFIED_FILES=true. - We’ve added support for Next.js 16’s
use cachedirectives. - We’ve added support for the React
useRefhook, with improved data flow tracking through thecurrentproperty.
Python
- The
py/decompression-bombquery now supports thecompression.zstdlibrary (added in Python 3.14). - We’ve added taint flow models for
urllib.parseand remote flow sources for thepython-socketiopackage. - The extractor now analyzes files in hidden directories by default.
Java/Kotlin
- We’ve added sink models for
com.couchbasesupporting SQL injection and hardcoded credentials queries. - We’ve added more dataflow models of
org.apache.commons.fileupload.FileItem,javax/jakarta.servlet.http.Part, andorg.apache.commons.fileupload.util.Streams.
C/C++
- We’ve added support for more Windows APIs, including file read functions, command-line and environment variable APIs, and flow models for SQLite and OpenSSL libraries.
Rust
- Method resolution now considers the
Dereftrait, which means method calls on receivers implementing theDereftrait will correctly resolve to methods defined on the target type. - We’ve added support for the Axum web application framework.
- We’ve improved type inference for raw pointers, including type inference for the raw borrow operators and dereferencing of raw pointers.
Query changes
C#
- We’ve extended the
Missing cross-site request forgery token validationquery to support ASP.NET Core. - We’ve added
NHibernate.ISession.CreateSQLQuery,NHibernate.IStatelessSession.CreateSQLQuery, andNHibernate.Impl.AbstractSessionImpl.CreateSQLQueryas SQL injection sinks. - We’ve 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.
JavaScript/TypeScript
- We’ve 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.
Java/Kotlin
- Java thread safety analysis now understands initialization to thread-safe classes inside constructors.
- We’ve added a sanitizer to
java/ssrfto remove alerts when a regular expression check verifies that the value is safe. - URI template variables of all Spring
RestTemplatemethods are now considered as request forgery sinks, which may lead to more alerts for the queryjava/ssrf.
C/C++
- We’ve improved the accuracy of the
cpp/constant-comparisonquery to reduce false positives.
Rust
- We’ve improved the accuracy of the
rust/unused-variable,rust/unused-value,rust/access-invalid-pointer, andrust/access-after-lifetime-endedqueries to reduce false positives. - We’ve extended the
rust/hard-coded-cryptographic-valuequery with new heuristic sinks identifying passwords, initialization vectors, nonces, and salts.
For a full list of changes, please refer to the complete changelog for version 2.24.0. Every new version of CodeQL is automatically deployed to users of GitHub code scanning on github.com. The new functionality in CodeQL 2.24.0 will also be included in a future GitHub Enterprise Server (GHES) release. If you use an older version of GHES, you can manually upgrade your CodeQL version.