Contents
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.
CodeQL 2.25.4 runs a total of 496 security queries when configured with the Default suite (covering 169 CWE). The Extended suite enables an additional 131 queries (covering 32 more CWE).
There are no user-facing CLI changes in this release.
The C# control flow graph (CFG) implementation has been completely rewritten. The CFG now includes additional nodes to more accurately represent certain constructs. This also means that any existing code that implicitly relies on very specific details about the CFG may need to be updated. The CFG no longer uses splitting, which means that AST nodes now have a unique CFG node representation. Additionally, the following breaking changes have been made:
ControlFlow::Node has been renamed to ControlFlowNode.
ControlFlow::Nodes has been renamed to ControlFlowNodes.
BasicBlock.getCallable has been renamed to BasicBlock.getEnclosingCallable.
BasicBlocks.qll has been deleted.
ControlFlowNode.getAstNode has changed its meaning. The AST-to-CFG mapping remains one-to-many, but now for a different reason. It used to be because of splitting, but now it’s because of additional “helper” CFG nodes. To get the (now canonical) CFG node for a given AST node, use ControlFlowNode.asExpr() or ControlFlowNode.asStmt() or ControlFlowElement.getControlFlowNode() instead.
When resolving dependencies in build-mode: none, dotnet restore now explicitly receives reachable NuGet feeds configured in nuget.config when feed responsiveness checking is enabled (the default), and any private registries directly, improving reliability when default feeds are unavailable or restricted.
Upgraded to allow analysis of Swift 6.3.1.
Added taint flow models for the Strsafe.h header from the Windows SDK.
Expanded ASP and ASP.NET remote source modeling to cover additional sources, including fields of tainted parameters as well as properties and fields that become tainted transitively.
C# 14: Added support for user-defined compound assignment operators.
Added sql-injection sink models for the Hibernate org.hibernate.query.QueryProducer methods createNativeMutationQuery, createMutationQuery, and createSelectionQuery.
The java/partial-path-traversal and java/partial-path-traversal-from-remote queries now correctly recognize file separator appends using +=.
The java/path-injection and java/zipslip queries now recognize Path.toRealPath() as a path normalization sanitizer, consistent with the existing treatment of Path.normalize() and File.getCanonicalPath(). This reduces false positives for code that uses the NIO.2 API for path canonicalization.
The java/sensitive-log query now excludes additional common variable naming patterns that do not hold sensitive data, reducing false positives. This includes pagination/iteration tokens (nextToken, pageToken, continuationToken), token metadata (tokenType, tokenEndpoint, tokenCount), and secret metadata (secretName, secretId, secretVersion).
The java/sensitive-log query now treats method calls whose names contain “encrypt”, “hash”, or “digest” as sanitizers, consistent with the existing treatment in java/cleartext-storage-in-log. This reduces false positives when sensitive data is hashed or encrypted before logging.
The java/trust-boundary-violation query now recognizes regular expression checks (including String.matches() guards and @javax.validation.constraints.Pattern annotations) as sanitizers, consistent with the existing treatment of ESAPI validators. This reduces false positives when input is validated against a pattern before being stored in a session.
The Python extractor now supports unpacking in comprehensions, e.g. [*x for x in nested] (as defined in PEP-798) that will be part of Python 3.15.
The QL classes in the C# SSA library have been renamed to improve consistency between languages. Any custom QL code that makes use of SSA needs to be updated. The old classes have been deprecated and include more detailed migration instructions in their qldoc.
A new predicate getSwitchCase was added to the SwitchStmt class, which yields the nth case statement from a switch statement.
Data flow barriers and barrier guards can now be added using data extensions. For more information see Customizing library models for C and C++.
Data flow barriers and barrier guards can now be added using data extensions. For more information see Customizing library models for C#.
Data flow barriers and barrier guards can now be added using data extensions. For more information see Customizing library models for Go.
Data flow barriers and barrier guards can now be added using data extensions. For more information see Customizing library models for Java and Kotlin.
Added support for @vercel/node Vercel serverless functions. Handlers are recognized via the VercelRequest/VercelResponse TypeScript parameter types, and standard security queries (js/reflected-xss, js/request-forgery, js/sql-injection, js/command-line-injection, etc.) now detect vulnerabilities in Vercel API route files.
Data flow barriers and barrier guards can now be added using data extensions. For more information see Customizing library models for JavaScript.
Data flow barriers and barrier guards can now be added using data extensions. For more information see Customizing library models for Python.
Data flow barriers and barrier guards can now be added using data extensions. For more information see Customizing library models for Ruby.
The BuiltinFixedArrayType class now defines the predicates getSize and getElementType, which yield the size of the array and the type of elements stored in the array, respectively.
Data flow barriers and barrier guards can now be added using data extensions.