CodeQL 2.20.6 (2025-03-06)¶
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.20.6 runs a total of 450 security queries when configured with the Default suite (covering 168 CWE). The Extended suite enables an additional 137 queries (covering 35 more CWE). 1 security query has been added with this release.
CodeQL CLI¶
Miscellaneous¶
The CodeQL XML extractor is now able to parse documents in a wider array of character sets.
The build of Eclipse Temurin OpenJDK that is used to run the CodeQL CLI has been updated to version 21.0.6.
Query Packs¶
Bug Fixes¶
GitHub Actions¶
The
actions/unversioned-immutable-actionquery will no longer report any alerts, since the Immutable Actions feature is not yet available for customer use. The query has also been moved to the experimental folder and will not be used in code scanning unless it is explicitly added to a code scanning configuration. Once the Immutable Actions feature is available, the query will be updated to report alerts again.
Major Analysis Improvements¶
Java/Kotlin¶
Fixed false positive alerts in the java query “Cross-site scripting” (
java/xss) whenjavax.servlet.http.HttpServletResponseis used with a content type which is not exploitable.
JavaScript/TypeScript¶
Improved precision of data flow through arrays, fixing some spurious flows that would sometimes cause the
lengthproperty of an array to be seen as tainted.Improved call resolution logic to better handle calls resolving “downwards”, targeting a method declared in a subclass of the enclosing class. Data flow analysis has also improved to avoid spurious flow between unrelated classes in the class hierarchy.
Minor Analysis Improvements¶
C/C++¶
Due to changes in libraries the query “Static array access may cause overflow” (
cpp/static-buffer-overflow) will no longer report cases where multiple fields of a struct or class are written with a singlememsetor similar operation.The query “Call to memory access function may overflow buffer” (
cpp/overflow-buffer) has been added to the security-extended query suite. The query detects a range of buffer overflow and underflow issues.
C#¶
C#: Improve precision of the query
cs/call-to-object-tostringfor value tuples.
Language Libraries¶
Major Analysis Improvements¶
JavaScript/TypeScript¶
Added support for the
responsethreat model kind, which can enabled with advanced setup. When enabled, the response data coming back from an outgoing HTTP request is considered a source of taint.Added support for the
useQueryhook from@tanstack/react-query.
Minor Analysis Improvements¶
C/C++¶
Modified the
getBufferSizepredicate incommons/Buffer.qllto be more tolerant in some cases involving member variables in a larger struct or class.Fixed an issue where the
getBufferSizepredicate incommons/Buffer.qllwas returning results for references insideoffsetofexpressions, which are not accesses to a buffer.
Golang¶
The location info for the following classes has been changed slightly to match a location that is in the database:
BasicBlock,ControlFlow::EntryNode,ControlFlow::ExitNode,ControlFlow::ConditionGuardNode,IR::ImplicitLiteralElementIndexInstruction,IR::EvalImplicitTrueInstruction,SsaImplicitDefinition,SsaPhiNode.Added
databasesource models for thegithub.com/rqlite/gorqlitepackage.Added
databasesource models for database methods from thego.mongodb.org/mongo-driver/mongopackage.
Java/Kotlin¶
Added a path injection sanitizer for the
childargument of ajava.io.Fileconstructor if that argument does not contain path traversal sequences.
JavaScript/TypeScript¶
The
response.download()function inexpressis now recognized as a sink for path traversal attacks.
Deprecated APIs¶
Golang¶
The member predicate
hasLocationInfohas been deprecated on the following classes:BasicBlock,Callable,Content,ContentSet,ControlFlow::Node,DataFlowCallable,DataFlow::Node,Entity,GVN,HtmlTemplate::TemplateStmt,IR:WriteTarget,SourceSinkInterpretationInput::SourceOrSinkElement,SourceSinkInterpretationInput::InterpretNode,SsaVariable,SsaDefinition,SsaWithFields,StringOps::ConcatenationElement,Type, andVariableWithFields. UsegetLocation()instead.
New Features¶
Java/Kotlin¶
The Java extractor and QL libraries now support Java 24.