Skip to content

Commit d06ca43

Browse files
authored
Merge pull request #18718 from github/changedocs/2.20.4
Update changelog to include new CodeQL CLI version
2 parents 614b3ce + 56cfebd commit d06ca43

File tree

4 files changed

+229
-4
lines changed

4 files changed

+229
-4
lines changed

docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.19.2.rst

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Golang
7474

7575
* Added member predicates :code:`StructTag.hasOwnFieldWithTag` and :code:`Field.getTag`, which enable CodeQL queries to examine struct field tags.
7676
* Added member predicate :code:`InterfaceType.hasPrivateMethodWithQualifiedName`, which enables CodeQL queries to distinguish interfaces with matching non-exported method names that are declared in different packages, and are therefore incompatible.
77+
* Local source models with the :code:`stdin` source kind have been added for the variable :code:`os.Stdin` and the functions :code:`fmt.Scan`, :code:`fmt.Scanf` and :code:`fmt.Scanln`. You can optionally include threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see `Analyzing your code with CodeQL queries <https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data%3E>`__ and `Customizing your advanced setup for code scanning <https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models>`__.
7778

7879
Python
7980
""""""

docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.20.1.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Python
5656

5757
* The Server Side Template Injection query (:code:`py/template-injection`), originally contributed to the experimental query pack by @porcupineyhairs, has been promoted to the main query suite. This query finds instances of templates for a template engine such as Jinja being constructed with user input.
5858

59-
Actions
60-
"""""""
59+
GitHub Actions
60+
""""""""""""""
6161

6262
* Initial public preview release
6363

@@ -149,8 +149,8 @@ Python
149149

150150
* Added support for parameter annotations in API graphs. This means that in a function definition such as :code:`def foo(x: Bar): ...`, you can now use the :code:`getInstanceFromAnnotation()` method to step from :code:`Bar` to :code:`x`. In addition to this, the :code:`getAnInstance` method now also includes instances arising from parameter annotations.
151151

152-
Actions
153-
"""""""
152+
GitHub Actions
153+
""""""""""""""
154154

155155
* Initial public preview release
156156

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
.. _codeql-cli-2.20.4:
2+
3+
==========================
4+
CodeQL 2.20.4 (2025-02-06)
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.20.4 runs a total of 454 security queries when configured with the Default suite (covering 168 CWE). The Extended suite enables an additional 128 queries (covering 34 more CWE).
18+
19+
CodeQL CLI
20+
----------
21+
22+
Bug Fixes
23+
~~~~~~~~~
24+
25+
* Fixed a bug where CodeQL for Java would fail with an SSL exception while trying to download :code:`maven`.
26+
27+
New Features
28+
~~~~~~~~~~~~
29+
30+
* Using the :code:`actions` language (for analysis of GitHub Actions workflows) no longer requires the :code:`CODEQL_ENABLE_EXPERIMENTAL_FEATURES` environment variable to be set. Support for analysis of GitHub Actions workflows remains in public preview.
31+
32+
Miscellaneous
33+
~~~~~~~~~~~~~
34+
35+
* The build of the `logback-core <https://logback.qos.ch/>`__ library that is used for logging in the CodeQL CLI has been updated to version 1.3.15.
36+
37+
Query Packs
38+
-----------
39+
40+
Bug Fixes
41+
~~~~~~~~~
42+
43+
JavaScript/TypeScript
44+
"""""""""""""""""""""
45+
46+
* Fixed a bug that would occur when TypeScript code was found in an HTML-like file, such as a :code:`.vue` file,
47+
but where it could not be associated with any :code:`tsconfig.json` file. Previously the embedded code was not extracted in this case, but should now be extracted properly.
48+
49+
Major Analysis Improvements
50+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
51+
52+
JavaScript/TypeScript
53+
"""""""""""""""""""""
54+
55+
* Improved support for NestJS applications that make use of dependency injection with custom providers.
56+
Calls to methods on an injected service should now be resolved properly.
57+
* TypeScript extraction is now better at analyzing projects where the main :code:`tsconfig.json` file does not include any source files, but references other :code:`tsconfig.json`\ -like files that do include source files.
58+
* The :code:`js/incorrect-suffix-check` query now recognises some good patterns of the form :code:`origin.indexOf("." + allowedOrigin)` that were previously falsely flagged.
59+
* Added a new threat model kind called :code:`view-component-input`, which can enabled with `advanced setup <https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models>`__.
60+
When enabled, all React props, Vue props, and input fields in an Angular component are seen as taint sources, even if none of the corresponding instantiation sites appear to pass in a tainted value.
61+
Some users may prefer this as a "defense in depth" option but note that it may result in false positives.
62+
Regardless of whether the threat model is enabled, CodeQL will propagate taint from the instantiation sites of such components into the components themselves.
63+
64+
Minor Analysis Improvements
65+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
66+
67+
C/C++
68+
"""""
69+
70+
* The "Wrong type of arguments to formatting function" query (:code:`cpp/wrong-type-format-argument`) now produces fewer FPs if the formatting function has multiple definitions.
71+
* The "Call to memory access function may overflow buffer" query (:code:`cpp/overflow-buffer`) now produces fewer FPs involving non-static member variables.
72+
73+
C#
74+
""
75+
76+
* All *experimental* queries have been deprecated. The queries are instead available as part of the *default* query suite in `CodeQL-Community-Packs <https://github.com/GitHubSecurityLab/CodeQL-Community-Packs>`__.
77+
78+
Java/Kotlin
79+
"""""""""""
80+
81+
* All *experimental* queries have been deprecated. The queries are instead available as part of the *default* query suite in `CodeQL-Community-Packs <https://github.com/GitHubSecurityLab/CodeQL-Community-Packs>`__.
82+
83+
Language Libraries
84+
------------------
85+
86+
Bug Fixes
87+
~~~~~~~~~
88+
89+
GitHub Actions
90+
""""""""""""""
91+
92+
* Fixed data for vulnerable versions of :code:`actions/download-artifact` and :code:`rlespinasse/github-slug-action` (following GHSA-cxww-7g56-2vh6 and GHSA-6q4m-7476-932w).
93+
* Improved :code:`untrustedGhCommandDataModel` regex for :code:`gh pr view` and Bash taint analysis in GitHub Actions.
94+
95+
Breaking Changes
96+
~~~~~~~~~~~~~~~~
97+
98+
C/C++
99+
"""""
100+
101+
* Deleted the deprecated :code:`getAllocatorCall` predicate from :code:`DeleteOrDeleteArrayExpr`, use :code:`getDeallocatorCall` instead.
102+
103+
C#
104+
""
105+
106+
* Deleted the deprecated :code:`getInstanceType` predicate from the :code:`UnboundGenericType` class.
107+
* Deleted the deprecated :code:`getElement` predicate from the :code:`Node` class in :code:`ControlFlowGraph.qll`, use :code:`getAstNode` instead.
108+
109+
Golang
110+
""""""
111+
112+
* Deleted the deprecated :code:`describeBitSize` predicate from :code:`IncorrectIntegerConversionLib.qll`
113+
114+
Java/Kotlin
115+
"""""""""""
116+
117+
* Deleted the deprecated :code:`isLValue` and :code:`isRValue` predicates from the :code:`VarAccess` class, use :code:`isVarWrite` and :code:`isVarRead` respectively instead.
118+
* Deleted the deprecated :code:`getRhs` predicate from the :code:`VarWrite` class, use :code:`getASource` instead.
119+
* Deleted the deprecated :code:`LValue` and :code:`RValue` classes, use :code:`VarWrite` and :code:`VarRead` respectively instead.
120+
* Deleted a lot of deprecated classes ending in ``*Access``, use the corresponding ``*Call`` classes instead.
121+
* Deleted a lot of deprecated predicates ending in ``*Access``, use the corresponding ``*Call`` predicates instead.
122+
* Deleted the deprecated :code:`EnvInput` and :code:`DatabaseInput` classes from :code:`FlowSources.qll`, use the threat models feature instead.
123+
* Deleted some deprecated API predicates from :code:`SensitiveApi.qll`, use the Sink classes from that file instead.
124+
125+
Python
126+
""""""
127+
128+
* Deleted the old deprecated TypeTracking library.
129+
* Deleted the deprecated :code:`classRef` predicate from the :code:`FieldStorage` module, use :code:`subclassRef` instead.
130+
* Deleted a lot of deprecated modules and predicates from :code:`Stdlib.qll`, use API-graphs directly instead.
131+
132+
Ruby
133+
""""
134+
135+
* Deleted the deprecated :code:`getCallNode` predicate from :code:`API::Node`, use :code:`asCall()` instead.
136+
* Deleted the deprecated :code:`getASubclass`, :code:`getAnImmediateSubclass`, :code:`getASuccessor`, :code:`getAPredecessor`, :code:`getASuccessor`, :code:`getDepth`, and :code:`getPath` predicates from :code:`API::Node`.
137+
* Deleted the deprecated :code:`Root`, :code:`Use`, and :code:`Def` classes from :code:`ApiGraphs.qll`.
138+
* Deleted the deprecated :code:`Label` module from :code:`ApiGraphs.qll`.
139+
* Deleted the deprecated :code:`getAUse`, :code:`getAnImmediateUse`, :code:`getARhs`, and :code:`getAValueReachingRhs` predicates from :code:`API::Node`, use :code:`getAValueReachableFromSource`, :code:`asSource`, :code:`asSink`, and :code:`getAValueReachingSink` instead.
140+
* Deleted the deprecated :code:`getAVariable` predicate from the :code:`ExprNode` class, use :code:`getVariable` instead.
141+
* Deleted the deprecated :code:`getAPotentialFieldAccessMethod` predicate from the :code:`ActiveRecordModelClass` class.
142+
* Deleted the deprecated :code:`ActiveRecordModelClassMethodCall` class from :code:`ActiveRecord.qll`, use :code:`ActiveRecordModelClass.getClassNode().trackModule().getMethod()` instead.
143+
* Deleted the deprecated :code:`PotentiallyUnsafeSqlExecutingMethodCall` class from :code:`ActiveRecord.qll`, use the :code:`SqlExecution` concept instead.
144+
* Deleted the deprecated :code:`ModelClass` and :code:`ModelInstance` classes from :code:`ActiveResource.qll`, use :code:`ModelClassNode` and :code:`ModelClassNode.getAnInstanceReference()` instead.
145+
* Deleted the deprecated :code:`Collection` class from :code:`ActiveResource.qll`, use :code:`CollectionSource` instead.
146+
* Deleted the deprecated :code:`ServiceInstantiation` and :code:`ClientInstantiation` classes from :code:`Twirp.qll`.
147+
* Deleted a lot of deprecated dataflow modules from ``*Query.qll`` files.
148+
* Deleted the old deprecated TypeTracking library.
149+
150+
Swift
151+
"""""
152+
153+
* Deleted the deprecated :code:`ArrayContent` class from the dataflow library, use :code:`CollectionContent` instead.
154+
* Deleted the deprecated :code:`getOptionsInput`, :code:`getRegexInput`, and :code:`getStringInput` predicates from the regexp library, use :code:`getAnOptionsInput`, :code:`getRegexInputNode`, and :code:`getStringInputNode` instead.
155+
156+
Major Analysis Improvements
157+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
158+
159+
JavaScript/TypeScript
160+
"""""""""""""""""""""
161+
162+
* Added new XSS sink where :code:`innerHTML` or :code:`outerHTML` is assigned to with the Angular Renderer2 API, plus modeled this API as a general attribute setter
163+
164+
Minor Analysis Improvements
165+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
166+
167+
C#
168+
""
169+
170+
* C# 13: Added MaD models for some overload implementations using :code:`ReadOnlySpan` parameters (like :code:`String.Format(System.String, System.ReadOnlySpan<System.Object>))`).
171+
* C# 13: Added support for the overload resolution priority attribute (:code:`OverloadResolutionPriority`). Usages of the attribute and the corresponding priority can be found using the QL class :code:`SystemRuntimeCompilerServicesOverloadResolutionPriorityAttribute`.
172+
* C# 13: Added support for partial properties and indexers.
173+
174+
Golang
175+
""""""
176+
177+
* Models-as-data models using "Parameter", "Parameter[n]" or "Parameter[n1..n2]" as the output now work correctly.
178+
* By implementing :code:`ImplicitFieldReadNode` it is now possible to declare a dataflow node that reads any content (fields, array members, map keys and values). For example, this is appropriate for modelling a serialization method that flattens a potentially deep data structure into a string or byte array.
179+
* The :code:`Template.Execute[Template]` methods of the :code:`text/template` package now correctly convey taint from any nested fields to their result. This may produce more results from any taint-tracking query when the :code:`text/template` package is in use.
180+
* Added the `rs cors <https://github.com/rs/cors>`__ library to the CorsMisconfiguration.ql query
181+
182+
Java/Kotlin
183+
"""""""""""
184+
185+
* We now allow classes which don't have any JAX-RS annotations to inherit JAX-RS annotations from superclasses or interfaces. This is not allowed in the JAX-RS specification, but some implementations, like Apache CXF, allow it. This may lead to more alerts being found.
186+
187+
Python
188+
""""""
189+
190+
* Additional data flow models for the builtin functions :code:`map`, :code:`filter`, :code:`zip`, and :code:`enumerate` have been added.
191+
192+
New Features
193+
~~~~~~~~~~~~
194+
195+
C/C++
196+
"""""
197+
198+
* A new predicate :code:`getOffsetInClass` was added to the :code:`Field` class, which computes the byte offset of a field relative to a given :code:`Class`.
199+
* New classes :code:`PreprocessorElifdef` and :code:`PreprocessorElifndef` were introduced, which represents the C23/C++23 :code:`#elifdef` and :code:`#elifndef` preprocessor directives.
200+
* A new class :code:`TypeLibraryImport` was introduced, which represents the :code:`#import` preprocessor directive as used by the Microsoft Visual C++ for importing type libraries.
201+
202+
Shared Libraries
203+
----------------
204+
205+
Breaking Changes
206+
~~~~~~~~~~~~~~~~
207+
208+
Dataflow Analysis
209+
"""""""""""""""""
210+
211+
* Deleted the deprecated :code:`Make` and :code:`MakeWithState` modules, use :code:`Global` and :code:`GlobalWithState` instead.
212+
* Deleted the deprecated :code:`hasFlow`, :code:`hasFlowPath`, :code:`hasFlowTo`, and :code:`hasFlowToExpr` predicates, use :code:`flow`, :code:`flowPath`, :code:`flowTo`, and :code:`flowToExpr` respectively instead.
213+
214+
Control Flow Analysis
215+
"""""""""""""""""""""
216+
217+
* Added a basic block construction as part of the library. This is currently considered an internal unstable API. The input signature to the control flow graph now requires two additional predicates: :code:`idOfAstNode` and
218+
:code:`idOfCfgScope`.
219+
220+
Type Trackers
221+
"""""""""""""
222+
223+
* Deleted the deprecated :code:`ConsistencyChecks` module.

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

+1
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.20.4
1415
codeql-cli-2.20.3
1516
codeql-cli-2.20.2
1617
codeql-cli-2.20.1

0 commit comments

Comments
 (0)