Skip to content

Commit 298c6b5

Browse files
authored
Merge pull request #14942 from github/codeql-cli-2.15.3
Mergeback post release changes from the `codeql-cli-2.15.3` branch to `main`
2 parents 483f4c3 + 6e4ad58 commit 298c6b5

File tree

76 files changed

+8583
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+8583
-6
lines changed
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
.. _codeql-cli-2.10.0:
2+
3+
==========================
4+
CodeQL 2.10.0 (2022-06-27)
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.10.0 runs a total of 339 security queries when configured with the Default suite (covering 142 CWE). The Extended suite enables an additional 104 queries (covering 30 more CWE). 4 security queries have been added with this release.
18+
19+
CodeQL CLI
20+
----------
21+
22+
Breaking Changes
23+
~~~~~~~~~~~~~~~~
24+
25+
* The :code:`--format=stats` option of :code:`codeql generate log-summary` has been renamed to :code:`--format=overall`. It now produces a richer JSON object that, in addition to the previous statistics about the run (which can be found in the :code:`stats` property) also records the most expensive predicates in the evaluation run.
26+
27+
Potentially Breaking Changes
28+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29+
30+
* The :code:`codeql resolve ml-model` command now requires one or more query specifications as command line arguments in order to determine the set of starting packs from which to initiate the resolution process. The command will locate all ML models in any qlpack that is a transitive dependency of any of the starting packs. Also, the output of the command has been expanded to include for each model the containing package's name, version, and path.
31+
32+
* The :code:`buildMetadata` inside of compiled CodeQL packs no longer contains a :code:`creationTime` property. This was removed in order to ensure that the content of a CodeQL pack is identical when it is re-compiled.
33+
34+
* The :code:`codeql pack download` command, when used with the :code:`--dir` option,
35+
now downloads requested packs in directories corresponding to their version numbers. Previously,
36+
:code:`codeql pack download --dir ./somewhere codeql/[email protected]` would download the pack into the :code:`./somewhere/codeql/java-queries` directory. Now, it will download the pack into the
37+
:code:`./somewhere/codeql/java-queries/0.1.2` directory. This allows you to download multiple versions of the same pack using a single command.
38+
39+
Bug Fixes
40+
~~~~~~~~~
41+
42+
* Fixed a bug where :code:`codeql pack download`, when used with the :code:`--dir` option, would not download a pack that is in the global package cache.
43+
44+
* Fixed a bug where some versions of a CodeQL package could not be downloaded if there are more than 100 versions of this package in the package registry.
45+
46+
* Fixed a bug where the :code:`--also-match` option for :code:`codeql resolve files` and :code:`codeql database index-files` does not work with relative paths.
47+
48+
* Fixed a bug that caused :code:`codeql query decompile` to ignore the
49+
:code:`--output` option when producing bytecode output (:code:`--kind=bytecode`),
50+
writing only to :code:`stdout`.
51+
52+
New Features
53+
~~~~~~~~~~~~
54+
55+
* You can now include diagnostic messages in the summary produced by the :code:`--print-diagnostics-summary` option of the
56+
:code:`codeql database interpret-results` and :code:`codeql database analyze` commands by running these commands at high verbosity levels.
57+
58+
Query Packs
59+
-----------
60+
61+
Major Analysis Improvements
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
63+
64+
Python
65+
""""""
66+
67+
* Improved library modeling for the query "Request without certificate validation" (:code:`py/request-without-cert-validation`), so it now also covers :code:`httpx`, :code:`aiohttp.client`, and :code:`urllib3`.
68+
69+
Minor Analysis Improvements
70+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
71+
72+
C#
73+
""
74+
75+
* The syntax of the (source|sink|summary)model CSV format has been changed slightly for Java and C#. A new column called :code:`provenance` has been introduced, where the allowed values are :code:`manual` and :code:`generated`. The value used to indicate whether a model as been written by hand (:code:`manual`) or create by the CSV model generator (:code:`generated`).
76+
* All auto implemented public properties with public getters and setters on ASP.NET Core remote flow sources are now also considered to be tainted.
77+
78+
Java
79+
""""
80+
81+
* The query :code:`java/log-injection` now reports problems at the source (user-controlled data) instead of at the ultimate logging call. This was changed because user functions that wrap the ultimate logging call could result in most alerts being reported in an uninformative location.
82+
83+
JavaScript/TypeScript
84+
"""""""""""""""""""""
85+
86+
* The :code:`js/resource-exhaustion` query no longer treats the 3-argument version of :code:`Buffer.from` as a sink,
87+
since it does not allocate a new buffer.
88+
89+
Python
90+
""""""
91+
92+
* The query "Use of a broken or weak cryptographic algorithm" (:code:`py/weak-cryptographic-algorithm`) now reports if a cryptographic operation is potentially insecure due to use of a weak block mode.
93+
94+
Ruby
95+
""""
96+
97+
* The query "Use of a broken or weak cryptographic algorithm" (:code:`rb/weak-cryptographic-algorithm`) now reports if a cryptographic operation is potentially insecure due to use of a weak block mode.
98+
99+
New Queries
100+
~~~~~~~~~~~
101+
102+
Ruby
103+
""""
104+
105+
* Added a new query, :code:`rb/improper-memoization`. The query finds cases where the parameter of a memoization method is not used in the memoization key.
106+
107+
Query Metadata Changes
108+
~~~~~~~~~~~~~~~~~~~~~~
109+
110+
C#
111+
""
112+
113+
* The :code:`kind` query metadata was changed to :code:`diagnostic` on :code:`cs/compilation-error`, :code:`cs/compilation-message`, :code:`cs/extraction-error`, and :code:`cs/extraction-message`.
114+
115+
Language Libraries
116+
------------------
117+
118+
Bug Fixes
119+
~~~~~~~~~
120+
121+
C/C++
122+
"""""
123+
124+
* :code:`UserType.getADeclarationEntry()` now yields all forward declarations when the user type is a :code:`class`, :code:`struct`, or :code:`union`.
125+
126+
Major Analysis Improvements
127+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
128+
129+
JavaScript/TypeScript
130+
"""""""""""""""""""""
131+
132+
* Added support for TypeScript 4.7.
133+
134+
Minor Analysis Improvements
135+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
136+
137+
Java
138+
""""
139+
140+
* Added a flow step for :code:`String.valueOf` calls on tainted :code:`android.text.Editable` objects.
141+
142+
JavaScript/TypeScript
143+
"""""""""""""""""""""
144+
145+
* All new ECMAScript 2022 features are now supported.
146+
147+
Deprecated APIs
148+
~~~~~~~~~~~~~~~
149+
150+
C/C++
151+
"""""
152+
153+
* The :code:`BarrierGuard` class has been deprecated. Such barriers and sanitizers can now instead be created using the new :code:`BarrierGuard` parameterized module.
154+
155+
C#
156+
""
157+
158+
* The :code:`BarrierGuard` class has been deprecated. Such barriers and sanitizers can now instead be created using the new :code:`BarrierGuard` parameterized module.
159+
160+
Golang
161+
""""""
162+
163+
* The :code:`BarrierGuard` class has been deprecated. Such barriers and sanitizers can now instead be created using the new :code:`BarrierGuard` parameterized module.
164+
165+
Java
166+
""""
167+
168+
* The :code:`BarrierGuard` class has been deprecated. Such barriers and sanitizers can now instead be created using the new :code:`BarrierGuard` parameterized module.
169+
170+
Python
171+
""""""
172+
173+
* The :code:`BarrierGuard` class has been deprecated. Such barriers and sanitizers can now instead be created using the new :code:`BarrierGuard` parameterized module.
174+
175+
Ruby
176+
""""
177+
178+
* The :code:`BarrierGuard` class has been deprecated. Such barriers and sanitizers can now instead be created using the new :code:`BarrierGuard` parameterized module.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
.. _codeql-cli-2.10.1:
2+
3+
==========================
4+
CodeQL 2.10.1 (2022-07-19)
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.10.1 runs a total of 340 security queries when configured with the Default suite (covering 143 CWE). The Extended suite enables an additional 104 queries (covering 30 more CWE). 1 security query has been added with this release.
18+
19+
CodeQL CLI
20+
----------
21+
22+
New Features
23+
~~~~~~~~~~~~
24+
25+
* Improved error message from :code:`codeql database analyze` when a query is missing :code:`@id` or :code:`@kind` query metadata.
26+
27+
Query Packs
28+
-----------
29+
30+
Breaking Changes
31+
~~~~~~~~~~~~~~~~
32+
33+
C/C++
34+
"""""
35+
36+
* Contextual queries and the query libraries they depend on have been moved to the :code:`codeql/cpp-all` package.
37+
38+
C#
39+
""
40+
41+
* Contextual queries and the query libraries they depend on have been moved to the :code:`codeql/csharp-all` package.
42+
43+
Java
44+
""""
45+
46+
* Contextual queries and the query libraries they depend on have been moved to the :code:`codeql/java-all` package.
47+
48+
JavaScript/TypeScript
49+
"""""""""""""""""""""
50+
51+
* Contextual queries and the query libraries they depend on have been moved to the :code:`codeql/javascript-all` package.
52+
53+
Python
54+
""""""
55+
56+
* Contextual queries and the query libraries they depend on have been moved to the :code:`codeql/python-all` package.
57+
58+
Ruby
59+
""""
60+
61+
* Contextual queries and the query libraries they depend on have been moved to the :code:`codeql/ruby-all` package.
62+
63+
New Queries
64+
~~~~~~~~~~~
65+
66+
Java
67+
""""
68+
69+
* A new query "Improper verification of intent by broadcast receiver" (:code:`java/improper-intent-verification`) has been added.
70+
This query finds instances of Android :code:`BroadcastReceiver`\ s that don't verify the action string of received intents when registered to receive system intents.
71+
72+
Language Libraries
73+
------------------
74+
75+
Minor Analysis Improvements
76+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
77+
78+
C/C++
79+
"""""
80+
81+
* :code:`AnalysedExpr::isNullCheck` and :code:`AnalysedExpr::isValidCheck` have been updated to handle variable accesses on the left-hand side of the C++ logical "and", and variable declarations in conditions.
82+
83+
Java
84+
""""
85+
86+
* Added data-flow models for :code:`java.util.Properties`. Additional results may be found where relevant data is stored in and then retrieved from a :code:`Properties` instance.
87+
* Added :code:`Modifier.isInline()`.
88+
* Removed Kotlin-specific database and QL structures for loops and :code:`break`\ /\ :code:`continue` statements. The Kotlin extractor was changed to reuse the Java structures for these constructs.
89+
* Added additional flow sources for uses of external storage on Android.
90+
91+
JavaScript/TypeScript
92+
"""""""""""""""""""""
93+
94+
* The :code:`chownr` library is now modeled as a sink for the :code:`js/path-injection` query.
95+
* Improved modeling of sensitive data sources, so common words like :code:`certain` and :code:`secretary` are no longer considered a certificate and a secret (respectively).
96+
* The :code:`gray-matter` library is now modeled as a sink for the :code:`js/code-injection` query.
97+
98+
Python
99+
""""""
100+
101+
* Improved modeling of sensitive data sources, so common words like :code:`certain` and :code:`secretary` are no longer considered a certificate and a secret (respectively).
102+
103+
Ruby
104+
""""
105+
106+
* Fixed a bug causing every expression in the database to be considered a system-command execution sink when calls to any of the following methods exist:
107+
108+
* The :code:`spawn`, :code:`fspawn`, :code:`popen4`, :code:`pspawn`, :code:`system`, :code:`_pspawn` methods and the backtick operator from the :code:`POSIX::spawn` gem.
109+
* The :code:`execute_command`, :code:`rake`, :code:`rails_command`, and :code:`git` methods in :code:`Rails::Generation::Actions`.
110+
111+
* Improved modeling of sensitive data sources, so common words like :code:`certain` and :code:`secretary` are no longer considered a certificate and a secret (respectively).
112+
113+
Deprecated APIs
114+
~~~~~~~~~~~~~~~
115+
116+
Python
117+
""""""
118+
119+
* The documentation of API graphs (the :code:`API` module) has been expanded, and some of the members predicates of :code:`API::Node` have been renamed as follows:
120+
121+
* :code:`getAnImmediateUse` -> :code:`asSource`
122+
* :code:`getARhs` -> :code:`asSink`
123+
* :code:`getAUse` -> :code:`getAValueReachableFromSource`
124+
* :code:`getAValueReachingRhs` -> :code:`getAValueReachingSink`
125+
126+
New Features
127+
~~~~~~~~~~~~
128+
129+
Java
130+
""""
131+
132+
* Added an :code:`ErrorType` class. An instance of this class will be used if an extractor is unable to extract a type, or if an up/downgrade script is unable to provide a type.

0 commit comments

Comments
 (0)