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::Nodehas been renamed toControlFlowNode.ControlFlow::Nodeshas been renamed toControlFlowNodes.BasicBlock.getCallablehas been renamed toBasicBlock.getEnclosingCallable.BasicBlocks.qllhas been deleted.ControlFlowNode.getAstNodehas 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, useControlFlowNode.asExpr()orControlFlowNode.asStmt()orControlFlowElement.getControlFlowNode()instead.
- When resolving dependencies in
build-mode: none,dotnet restorenow explicitly receives reachable NuGet feeds configured innuget.configwhen 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.hheader 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-injectionsink models for the Hibernateorg.hibernate.query.QueryProducermethodscreateNativeMutationQuery,createMutationQuery, andcreateSelectionQuery. - The
java/partial-path-traversalandjava/partial-path-traversal-from-remotequeries now correctly recognize file separator appends using+=. - The
java/path-injectionandjava/zipslipqueries now recognizePath.toRealPath()as a path normalization sanitizer, consistent with the existing treatment ofPath.normalize()andFile.getCanonicalPath(). This reduces false positives for code that uses the NIO.2 API for path canonicalization. - The
java/sensitive-logquery 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-logquery now treats method calls whose names contain "encrypt", "hash", or "digest" as sanitizers, consistent with the existing treatment injava/cleartext-storage-in-log. This reduces false positives when sensitive data is hashed or encrypted before logging. - The
java/trust-boundary-violationquery now recognizes regular expression checks (includingString.matches()guards and@javax.validation.constraints.Patternannotations) 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
getSwitchCasewas added to theSwitchStmtclass, which yields thenthcasestatement from aswitchstatement. - 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/nodeVercel serverless functions. Handlers are recognized via theVercelRequest/VercelResponseTypeScript 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
BuiltinFixedArrayTypeclass now defines the predicatesgetSizeandgetElementType, 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.