Skip to content

Commit 93d9332

Browse files
authored
Merge pull request #15236 from github/codeql-cli-2.15.5
Merge `codeql-cli-2.15.5` back to `main`
2 parents d1fc40c + 59edae0 commit 93d9332

File tree

4 files changed

+132
-9
lines changed

4 files changed

+132
-9
lines changed

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

+8
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ Dataflow Analysis
158158

159159
* The API for debugging flow using partial flow has changed slightly. Instead of using :code:`module Partial = FlowExploration<limit/0>` and choosing between :code:`Partial::partialFlow` and :code:`Partial::partialFlowRev`, you now choose between :code:`module Partial = FlowExplorationFwd<limit/0>` and :code:`module Partial = FlowExplorationRev<limit/0>`, and then always use :code:`Partial::partialFlow`.
160160

161+
Minor Analysis Improvements
162+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
163+
164+
Range Analysis
165+
""""""""""""""
166+
167+
* Initial release. Moves the range analysis library into its own qlpack.
168+
161169
New Features
162170
~~~~~~~~~~~~
163171

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

+8-9
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,19 @@ Bug Fixes
2323
~~~~~~~~~
2424

2525
* Fixed an internal error in the compiler when arguments to the :code:`codePointCount` string primitive were not bound.
26-
* Fixed a bug where :code:`codeql database finalize` would fail if a database under construction was moved between machines between
27-
:code:`codeql database init` and :code:`codeql database finalize`. This should now work, as long as both commands are run by the same *release* of the CodeQL CLI and the extractors used are the ones bundled with the CLI.
26+
* Fixed a bug where :code:`codeql database finalize` would fail if a database under construction was moved between machines between :code:`codeql database init` and :code:`codeql database finalize`.
27+
This should now work, as long as both commands are run by the same *release* of the CodeQL CLI and the extractors used are the ones bundled with the CLI.
2828
* Fixed a bug where :code:`codeql database run-queries` would fail in some circumstances when the database path included an :code:`@`.
2929

3030
New Features
3131
~~~~~~~~~~~~
3232

33-
* A new compilation flag (:code:`--fail-on-ambiguous-relation-name`) has been added to specify that compilation should fail if the compiler generates an ambiguous relation name.
33+
* :code:`codeql database analyze` now defaults to include markdown query help for all custom queries with help files available. To change the default behaviour you can pass the new flag :code:`--sarif-include-query-help`, which provides the options :code:`always` (which includes query help for all queries), :code:`custom_queries_only` (the default) and :code:`never` (which does not include query help for any query). The existing flag
34+
:code:`--sarif-add-query-help` has been deprecated and will be removed in a future release.
3435
* The new (advanced) command-line option :code:`--[no-]linkage-aware-import` disables the linkage-awareness phase of :code:`codeql dataset import`, as a quick fix (at the expense of database completeness) for C++ projects where this part of database creation consumes too much memory. This option is available in the commands :code:`database create`,
3536
:code:`database finalize`, :code:`database import`, :code:`dataset import`, :code:`test extract`, and
3637
:code:`test run`.
3738
* The CodeQL language server now provides basic support for Rename, and you can now use the Rename Symbol functionality in Visual Studio Code for CodeQL. The current Rename support is less a refactoring tool and more a labor-saving device. You may have to perform some manual edits after using Rename, but it should still be faster and less work than renaming a symbol manually.
38-
* :code:`codeql database analyze` now defaults to include markdown query help for all custom queries with help files available. To change the default behaviour you can pass the new flag :code:`--sarif-include-query-help`, which provides the options :code:`always` (which includes query help for all queries), :code:`custom_queries_only` (the default) and :code:`never` (which does not include query help for any query). The existing flag
39-
:code:`--sarif-add-query-help` has been deprecated and will be removed in a future release.
4039

4140
Improvements
4241
~~~~~~~~~~~~
@@ -84,16 +83,16 @@ Swift
8483
"""""
8584

8685
* Added new query "System command built from user-controlled sources" (:code:`swift/command-line-injection`) for Swift. This query detects system commands built from user-controlled sources without sufficient validation. The query was previously `contributed to the 'experimental' directory by @maikypedia <https://github.com/github/codeql/pull/13726>`__ but will now run by default for all code scanning users.
87-
* Added a nw query "Missing regular expression anchor" (:code:`swift/missing-regexp-anchor`) for Swift. This query detects regular expressions without anchors that can be vulnerable to bypassing.
86+
* Added a new query "Missing regular expression anchor" (:code:`swift/missing-regexp-anchor`) for Swift. This query detects regular expressions without anchors that can be vulnerable to bypassing.
8887

8988
Query Metadata Changes
9089
~~~~~~~~~~~~~~~~~~~~~~
9190

9291
JavaScript/TypeScript
9392
"""""""""""""""""""""
9493

95-
* Lower the severity of log-injection to medium.
96-
* Increase the severity of XSS to high.
94+
* Lower the security severity of log-injection to medium.
95+
* Increase the security severity of XSS to high.
9796

9897
Language Libraries
9998
------------------
@@ -192,7 +191,7 @@ C#
192191
Golang
193192
""""""
194193

195-
* Added the `gin cors <https://github.com/gin-contrib/cors>`__ library to the CorsMisconfiguration.ql query
194+
* Added the `gin-contrib/cors <https://github.com/gin-contrib/cors>`__ library to the experimental query "CORS misconfiguration" (:code:`go/cors-misconfiguration`).
196195

197196
Java
198197
""""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
.. _codeql-cli-2.15.4:
2+
3+
==========================
4+
CodeQL 2.15.4 (2023-12-11)
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+
CodeQL CLI
15+
----------
16+
17+
Improvements
18+
~~~~~~~~~~~~
19+
20+
* Parallelism in the evaluator has been improved, resulting in faster analysis when running with many threads, particularly for large databases.
21+
22+
Query Packs
23+
-----------
24+
25+
Breaking Changes
26+
~~~~~~~~~~~~~~~~
27+
28+
C/C++
29+
"""""
30+
31+
* The :code:`cpp/tainted-format-string-through-global` query has been deleted. This does not lead to a loss of relevant alerts, as the query duplicated a subset of the alerts from :code:`cpp/tainted-format-string`.
32+
33+
Minor Analysis Improvements
34+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
35+
36+
C#
37+
""
38+
39+
* Modelled additional flow steps to track flow from a :code:`View` call in an MVC controller to the corresponding Razor View (:code:`.cshtml`) file, which may result in additional results for queries such as :code:`cs/web/xss`.
40+
41+
JavaScript/TypeScript
42+
"""""""""""""""""""""
43+
44+
* Added django URLs to detected "safe" URL patterns in :code:`js/unsafe-external-link`.
45+
46+
Swift
47+
"""""
48+
49+
* Added additional sinks for the "Uncontrolled format string" (:code:`swift/uncontrolled-format-string`) query. Some of these sinks are heuristic (imprecise) in nature.
50+
* Added heuristic (imprecise) sinks for the "Database query built from user-controlled sources" (:code:`swift/sql-injection`) query.
51+
52+
New Queries
53+
~~~~~~~~~~~
54+
55+
C/C++
56+
"""""
57+
58+
* Added a new query, :code:`cpp/use-of-string-after-lifetime-ends`, to detect calls to :code:`c_str` on strings that will be destroyed immediately.
59+
60+
Language Libraries
61+
------------------
62+
63+
Bug Fixes
64+
~~~~~~~~~
65+
66+
Golang
67+
""""""
68+
69+
* A bug has been fixed that meant that value flow through a slice expression was not tracked correctly. Taint flow was tracked correctly.
70+
71+
Minor Analysis Improvements
72+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
73+
74+
Java
75+
""""
76+
77+
* The diagnostic query :code:`java/diagnostics/successfully-extracted-files`, and therefore the Code Scanning UI measure of scanned Java files, now considers any Java file seen during extraction, even one with some errors, to be extracted / scanned.
78+
* Switch cases using binding patterns and :code:`case null[, default]` are now supported. Classes :code:`PatternCase` and :code:`NullDefaultCase` are introduced to represent new kinds of case statement.
79+
* Both switch cases and instanceof expressions using record patterns are now supported. The new class :code:`RecordPatternExpr` is introduced to represent record patterns, and :code:`InstanceOfExpr` gains :code:`getPattern` to replace :code:`getLocalVariableDeclExpr`.
80+
* The control-flow graph and therefore dominance information regarding switch blocks in statement context but with an expression rule (e.g. :code:`switch(...) { case 1 -> System.out.println("Hello world!") }`) has been fixed. This reduces false positives and negatives from various queries relating to functions featuring such statements.
81+
82+
JavaScript/TypeScript
83+
"""""""""""""""""""""
84+
85+
* Added models for the :code:`sqlite` and :code:`better-sqlite3` npm packages.
86+
* TypeScript 5.3 is now supported.
87+
88+
Python
89+
""""""
90+
91+
* Added support for tarfile extraction filters as defined in `PEP-706 <https://peps.python.org/pep-0706>`__. In particular, calls to :code:`TarFile.extract`, and :code:`TarFile.extractall` are no longer considered to be sinks for the :code:`py/tarslip` query if a sufficiently safe filter is provided.
92+
* Added modeling of :code:`*args` and :code:`**kwargs` as routed-parameters in request handlers for django/flask/FastAPI/tornado.
93+
* Added support for type parameters in function and class definitions, as well as the new Python 3.12 type alias statement.
94+
* Added taint-flow modeling for regular expressions with :code:`re` module from the standard library.
95+
96+
Ruby
97+
""""
98+
99+
* Improved modeling for :code:`ActiveRecord`\ s :code:`update_all` method
100+
101+
Swift
102+
"""""
103+
104+
* Extracts Swift's :code:`DiscardStmt` and :code:`MaterizliePackExpr`
105+
* Expanded and improved flow models for :code:`Set` and :code:`Sequence`.
106+
* Added imprecise flow sources matching initializers such as :code:`init(contentsOfFile:)`.
107+
* Extracts :code:`MacroDecl` and some related information
108+
109+
New Features
110+
~~~~~~~~~~~~
111+
112+
C/C++
113+
"""""
114+
115+
* Added an :code:`isPrototyped` predicate to :code:`Function` that holds when the function has a prototype.

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

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This is an overview of changes in the CodeQL CLI and relevant CodeQL query and l
99
.. toctree::
1010
:maxdepth: 1
1111

12+
codeql-cli-2.15.4
1213
codeql-cli-2.15.3
1314
codeql-cli-2.15.2
1415
codeql-cli-2.15.1

0 commit comments

Comments
 (0)