Skip to content

Commit 35691db

Browse files
authored
Merge pull request #19643 from github/changedocs/2.21.4
Docs: Add changelog entry for CodeQL 2.21.4 release
2 parents f48012a + 2e5ce06 commit 35691db

File tree

2 files changed

+188
-0
lines changed

2 files changed

+188
-0
lines changed
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
.. _codeql-cli-2.21.4:
2+
3+
==========================
4+
CodeQL 2.21.4 (2025-06-02)
5+
==========================
6+
7+
.. contents:: Contents
8+
:depth: 2
9+
:local:
10+
:backlinks: none
11+
12+
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 <https://github.blog/tag/code-scanning/>`__, `relevant GitHub Changelog updates <https://github.blog/changelog/label/code-scanning/>`__, `changes in the CodeQL extension for Visual Studio Code <https://marketplace.visualstudio.com/items/GitHub.vscode-codeql/changelog>`__, and the `CodeQL Action changelog <https://github.com/github/codeql-action/blob/main/CHANGELOG.md>`__.
13+
14+
Security Coverage
15+
-----------------
16+
17+
CodeQL 2.21.4 runs a total of 449 security queries when configured with the Default suite (covering 165 CWE). The Extended suite enables an additional 128 queries (covering 33 more CWE).
18+
19+
CodeQL CLI
20+
----------
21+
22+
Deprecations
23+
~~~~~~~~~~~~
24+
25+
* The :code:`clang_vector_types`, :code:`clang_attributes`, and :code:`flax-vector-conversions` command line options have been removed from the C/C++ extractor. These options were introduced as workarounds to frontend limitations in earlier versions of the extractor and are no longer needed when calling the extractor directly.
26+
27+
Miscellaneous
28+
~~~~~~~~~~~~~
29+
30+
* The build of Eclipse Temurin OpenJDK that is used to run the CodeQL CLI has been updated to version 21.0.7.
31+
32+
Query Packs
33+
-----------
34+
35+
Minor Analysis Improvements
36+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
37+
38+
C/C++
39+
"""""
40+
41+
* Added flow model for the :code:`SQLite` and :code:`OpenSSL` libraries. This may result in more alerts when running queries on codebases that use these libraries.
42+
43+
C#
44+
""
45+
46+
* The precision of the query :code:`cs/missed-readonly-modifier` has been improved. Some false positives related to static fields and struct type fields have been removed.
47+
* The queries :code:`cs/password-in-configuration`, :code:`cs/hardcoded-credentials` and :code:`cs/hardcoded-connection-string-credentials` have been removed from all query suites.
48+
* The precision of the query :code:`cs/gethashcode-is-not-defined` has been improved (false negative reduction). Calls to more methods (and indexers) that rely on the invariant :code:`e1.Equals(e2)` implies :code:`e1.GetHashCode() == e2.GetHashCode()` are taken into account.
49+
* The precision of the query :code:`cs/uncontrolled-format-string` has been improved (false negative reduction). Calls to :code:`System.Text.CompositeFormat.Parse` are now considered a format like method call.
50+
51+
Golang
52+
""""""
53+
54+
* The query :code:`go/hardcoded-credentials` has been removed from all query suites.
55+
56+
Java/Kotlin
57+
"""""""""""
58+
59+
* The query :code:`java/hardcoded-credential-api-call` has been removed from all query suites.
60+
61+
JavaScript/TypeScript
62+
"""""""""""""""""""""
63+
64+
* The queries :code:`js/hardcoded-credentials` and :code:`js/password-in-configuration-file` have been removed from all query suites.
65+
66+
Python
67+
""""""
68+
69+
* The query :code:`py/hardcoded-credentials` has been removed from all query suites.
70+
71+
Ruby
72+
""""
73+
74+
* The query :code:`rb/hardcoded-credentials` has been removed from all query suites.
75+
76+
Swift
77+
"""""
78+
79+
* The queries :code:`swift/hardcoded-key` and :code:`swift/constant-password` have been removed from all query suites.
80+
81+
GitHub Actions
82+
""""""""""""""
83+
84+
* The query :code:`actions/missing-workflow-permissions` is now aware of the minimal permissions needed for the actions :code:`deploy-pages`, :code:`delete-package-versions`, :code:`ai-inference`. This should lead to better alert messages and better fix suggestions.
85+
86+
Language Libraries
87+
------------------
88+
89+
Bug Fixes
90+
~~~~~~~~~
91+
92+
C/C++
93+
"""""
94+
95+
* Fixed a problem where :code:`asExpr()` on :code:`DataFlow::Node` would never return :code:`ArrayAggregateLiteral`\ s.
96+
* Fixed a problem where :code:`asExpr()` on :code:`DataFlow::Node` would never return :code:`ClassAggregateLiteral`\ s.
97+
98+
Ruby
99+
""""
100+
101+
* Bug Fixes
102+
* The Ruby printAst.qll library now orders AST nodes slightly differently: child nodes that do not literally appear in the source code, but whose parent nodes do, are assigned a deterministic order based on a combination of source location and logical order within the parent. This fixes the non-deterministic ordering that sometimes occurred depending on evaluation order. The effect may also be visible in downstream uses of the printAst library, such as the AST view in the VSCode extension.
103+
104+
Breaking Changes
105+
~~~~~~~~~~~~~~~~
106+
107+
C/C++
108+
"""""
109+
110+
* Deleted the deprecated :code:`userInputArgument` predicate and its convenience accessor from the :code:`Security.qll`.
111+
* Deleted the deprecated :code:`userInputReturned` predicate and its convenience accessor from the :code:`Security.qll`.
112+
* Deleted the deprecated :code:`userInputReturn` predicate from the :code:`Security.qll`.
113+
* Deleted the deprecated :code:`isUserInput` predicate and its convenience accessor from the :code:`Security.qll`.
114+
* Deleted the deprecated :code:`userInputArgument` predicate from the :code:`SecurityOptions.qll`.
115+
* Deleted the deprecated :code:`userInputReturned` predicate from the :code:`SecurityOptions.qll`.
116+
117+
Swift
118+
"""""
119+
120+
* Deleted the deprecated :code:`parseContent` predicate from the :code:`ExternalFlow.qll`.
121+
* Deleted the deprecated :code:`hasLocationInfo` predicate from the :code:`DataFlowPublic.qll`.
122+
* Deleted the deprecated :code:`SummaryComponent` class from the :code:`FlowSummary.qll`.
123+
* Deleted the deprecated :code:`SummaryComponentStack` class from the :code:`FlowSummary.qll`.
124+
* Deleted the deprecated :code:`SummaryComponent` module from the :code:`FlowSummary.qll`.
125+
* Deleted the deprecated :code:`SummaryComponentStack` module from the :code:`FlowSummary.qll`.
126+
* Deleted the deprecated :code:`RequiredSummaryComponentStack` class from the :code:`FlowSummary.qll`.
127+
128+
Minor Analysis Improvements
129+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
130+
131+
C#
132+
""
133+
134+
* The generated Models as Data (MaD) models for .NET 9 Runtime have been updated and are now more precise (due to a recent model generator improvement).
135+
136+
JavaScript/TypeScript
137+
"""""""""""""""""""""
138+
139+
* Improved analysis for :code:`ES6 classes` mixed with :code:`function prototypes`, leading to more accurate call graph resolution.
140+
141+
Python
142+
""""""
143+
144+
* The Python extractor now extracts files in hidden directories by default. If you would like to skip files in hidden directories, add :code:`paths-ignore: ["**/.*/**"]` to your `Code Scanning config <https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#specifying-directories-to-scan>`__. If you would like to skip all hidden files, you can use :code:`paths-ignore: ["**/.*"]`. When using the CodeQL CLI for extraction, specify the configuration (creating the configuration file if necessary) using the :code:`--codescanning-config` option.
145+
146+
Ruby
147+
""""
148+
149+
* Captured variables are currently considered live when the capturing function exits normally. Now they are also considered live when the capturing function exits via an exception.
150+
151+
Swift
152+
"""""
153+
154+
* Updated to allow analysis of Swift 6.1.1.
155+
* :code:`TypeValueExpr` experimental AST leaf is now implemented in the control flow library
156+
157+
Deprecated APIs
158+
~~~~~~~~~~~~~~~
159+
160+
Java/Kotlin
161+
"""""""""""
162+
163+
* The predicate :code:`getValue()` on :code:`SpringRequestMappingMethod` is now deprecated. Use :code:`getAValue()` instead.
164+
* Java now uses the shared :code:`BasicBlock` library. This means that the names of several member predicates have been changed to align with the names used in other languages. The old predicates have been deprecated. The :code:`BasicBlock` class itself no longer extends :code:`ControlFlowNode` - the predicate :code:`getFirstNode` can be used to fix any QL code that somehow relied on this.
165+
166+
New Features
167+
~~~~~~~~~~~~
168+
169+
C/C++
170+
"""""
171+
172+
* Added local flow source models for :code:`ReadFile`, :code:`ReadFileEx`, :code:`MapViewOfFile`, :code:`MapViewOfFile2`, :code:`MapViewOfFile3`, :code:`MapViewOfFile3FromApp`, :code:`MapViewOfFileEx`, :code:`MapViewOfFileFromApp`, :code:`MapViewOfFileNuma2`, and :code:`NtReadFile`.
173+
* Added the :code:`pCmdLine` arguments of :code:`WinMain` and :code:`wWinMain` as local flow sources.
174+
* Added source models for :code:`GetCommandLineA`, :code:`GetCommandLineW`, :code:`GetEnvironmentStringsA`, :code:`GetEnvironmentStringsW`, :code:`GetEnvironmentVariableA`, and :code:`GetEnvironmentVariableW`.
175+
* Added summary models for :code:`CommandLineToArgvA` and :code:`CommandLineToArgvW`.
176+
* Added support for :code:`wmain` as part of the ArgvSource model.
177+
178+
Shared Libraries
179+
----------------
180+
181+
Breaking Changes
182+
~~~~~~~~~~~~~~~~
183+
184+
Static Single Assignment (SSA)
185+
""""""""""""""""""""""""""""""
186+
187+
* Adjusted the Guards interface in the SSA data flow integration to distinguish :code:`hasBranchEdge` from :code:`controlsBranchEdge`. Any breakage can be fixed by implementing one with the other as a reasonable fallback solution.

docs/codeql/codeql-overview/codeql-changelog/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ A list of queries for each suite and language `is available here <https://docs.g
1111
.. toctree::
1212
:maxdepth: 1
1313

14+
codeql-cli-2.21.4
1415
codeql-cli-2.21.3
1516
codeql-cli-2.21.2
1617
codeql-cli-2.21.1

0 commit comments

Comments
 (0)