Skip to content

Commit b6aea3c

Browse files
authored
Merge pull request #17083 from github/changedocs/2.18.1
Update codeql changelog to version 2.18.1
2 parents 0ba5a74 + d189526 commit b6aea3c

File tree

2 files changed

+174
-0
lines changed

2 files changed

+174
-0
lines changed
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
.. _codeql-cli-2.18.1:
2+
3+
==========================
4+
CodeQL 2.18.1 (2024-07-25)
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.18.1 runs a total of 419 security queries when configured with the Default suite (covering 164 CWE). The Extended suite enables an additional 129 queries (covering 34 more CWE). 2 security queries have been added with this release.
18+
19+
CodeQL CLI
20+
----------
21+
22+
New Features
23+
~~~~~~~~~~~~
24+
25+
* The *experimental* type :code:`QlBuiltins::BigInt` of arbitrary-precision integers has been introduced. To opt in to this API, compile your queries with
26+
:code:`--allow-experimental=bigint`. Big integers can be constructed using the
27+
:code:`.toBigInt()` methods of :code:`int` and :code:`string`. The built-in operations are:
28+
29+
* comparisons: :code:`=`, :code:`!=`, :code:`<`, :code:`<=`, :code:`>`, :code:`>=`,
30+
* conversions: :code:`.toString()`, :code:`.toInt()`,
31+
* arithmetic: binary :code:`+`, :code:`-`, :code:`*`, :code:`/`, :code:`%`, unary :code:`-`,
32+
* bitwise operations: :code:`.bitAnd(BigInt)`, :code:`.bitOr(BigInt)`,
33+
:code:`.bitXor(BigInt)`, :code:`.bitShiftLeft(int)`, :code:`.bitShiftRightSigned(int)`,
34+
:code:`.bitNot()`,
35+
* aggregates: :code:`min`, :code:`max`, (:code:`strict`):code:`sum`, (:code:`strict`):code:`count`, :code:`avg`,
36+
:code:`rank`, :code:`unique`, :code:`any`.
37+
* other: :code:`.pow(int)`, :code:`.abs()`, :code:`.gcd(BigInt)`, :code:`.minimum(BigInt)`,
38+
:code:`.maximum(BigInt)`.
39+
40+
* :code:`codeql test run` now supports postprocessing of test results. When .qlref files specify a path to a :code:`postprocess` query, then this is evaluated after the test query to transform the test outputs prior to concatenating them into the :code:`actual` results.
41+
42+
Improvements
43+
~~~~~~~~~~~~
44+
45+
* The 30% QL query compilation slowdown noted in 2.18.0 has been fixed.
46+
47+
Security Updates
48+
~~~~~~~~~~~~~~~~
49+
50+
* Resolves CVE-2023-4759, an arbitrary file overwrite in Eclipse JGit that can be triggered when using untrusted third-party queries from a git repository. See the
51+
\ `security advisory <https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-x4gx-f2xv-6wj9>`__ for more information.
52+
* The following dependencies have been updated. These updates include security fixes in the respective libraries that prevent out-of-bounds accesses or denial-of-service in scenarios where untrusted files are processed. These scenarios are not likely to be encountered in most uses of CodeQL and code scanning, and only apply to advanced use cases where precompiled query packs,
53+
database ZIP files, or database TRAP files are obtained from untrusted sources and then processed on a trusted machine.
54+
55+
* airlift/aircompressor is updated to version 0.27.
56+
* Apache Ant is updated to version 1.10.11.
57+
* Apache Commons Compress is updated to version 1.26.0.
58+
* Apache Commons IO is updated to version 2.15.1.
59+
* Apache Commons Lang3 is updated to version 3.14.0.
60+
* jsoup is updated to version 1.15.3.
61+
* Logback is updated to version 1.2.13.
62+
* Snappy is updated to version 0.5.
63+
64+
Query Packs
65+
-----------
66+
67+
Minor Analysis Improvements
68+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
69+
70+
C/C++
71+
"""""
72+
73+
* The :code:`cpp/unsigned-difference-expression-compared-zero` ("Unsigned difference expression compared to zero") query now produces fewer false positives.
74+
75+
Java
76+
""""
77+
78+
* The heuristic to enable certain Android queries has been improved. Now it ignores Android Manifests which don't define an activity, content provider or service. We also only consider files which are under a folder containing such an Android Manifest for these queries. This should remove some false positive alerts.
79+
80+
JavaScript/TypeScript
81+
"""""""""""""""""""""
82+
83+
* Added a new query, :code:`js/functionality-from-untrusted-domain`, which detects uses in HTML and JavaScript scripts from untrusted domains, including the :code:`polyfill.io` content delivery network
84+
85+
* it can be extended to detect other compromised scripts using user-provided data extensions of the :code:`untrustedDomain` predicate, which takes one string argument with the domain to warn on (and will warn on any subdomains too).
86+
87+
* Modified existing query, :code:`js/functionality-from-untrusted-source`, to allow adding this new query, but reusing the same logic
88+
89+
* Added the ability to use data extensions to require SRI on CDN hostnames using the :code:`isCdnDomainWithCheckingRequired` predicate, which takes one string argument of the full hostname to require SRI for.
90+
91+
* Created a new library, :code:`semmle.javascript.security.FunctionalityFromUntrustedSource`, to support both queries.
92+
93+
New Queries
94+
~~~~~~~~~~~
95+
96+
JavaScript/TypeScript
97+
"""""""""""""""""""""
98+
99+
* Added a new query, :code:`js/insecure-helmet-configuration`, to detect instances where Helmet middleware is configured with important security features disabled.
100+
101+
Query Metadata Changes
102+
~~~~~~~~~~~~~~~~~~~~~~
103+
104+
C/C++
105+
"""""
106+
107+
* The precision of :code:`cpp/iterator-to-expired-container` ("Iterator to expired container") has been increased to :code:`high`. As a result, it will be run by default as part of the Code Scanning suite.
108+
* The precision of :code:`cpp/unsafe-strncat` ("Potentially unsafe call to strncat") has been increased to :code:`high`. As a result, it will be run by default as part of the Code Scanning suite.
109+
110+
Language Libraries
111+
------------------
112+
113+
Breaking Changes
114+
~~~~~~~~~~~~~~~~
115+
116+
Java
117+
""""
118+
119+
* The Java extractor no longer supports the :code:`SEMMLE_DIST` legacy environment variable.
120+
121+
Minor Analysis Improvements
122+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
123+
124+
Golang
125+
""""""
126+
127+
* There was a bug which meant that the built-in function :code:`clear` was considered as a sanitizer in some cases when it shouldn't have been. This has now been fixed, which may lead to more alerts.
128+
129+
Java
130+
""""
131+
132+
* Added a path-injection sink for :code:`hudson.FilePath.exists()`.
133+
* Added summary models for :code:`org.apache.commons.io.IOUtils.toByteArray`.
134+
* Java build-mode :code:`none` analyses now only report a warning on the CodeQL status page when there are significant analysis problems-- defined as 5% of expressions lacking a type, or 5% of call targets being unknown. Other messages reported on the status page are downgraded from warnings to notes and so are less prominent, but are still available for review.
135+
136+
Python
137+
""""""
138+
139+
* Additional modelling to detect direct writes to the :code:`Set-Cookie` header has been added for several web frameworks.
140+
141+
Swift
142+
"""""
143+
144+
* Additional heuristics for sensitive private information have been added to the :code:`SensitiveExprs.qll` library, improving coverage for credit card and social security numbers. This may result in additional results for queries that use sensitive data such as :code:`swift/cleartext-transmission`.
145+
146+
Deprecated APIs
147+
~~~~~~~~~~~~~~~
148+
149+
Java
150+
""""
151+
152+
* The predicate :code:`isAndroid` from the module :code:`semmle.code.java.security.AndroidCertificatePinningQuery` has been deprecated. Use :code:`semmle.code.java.frameworks.android.Android::inAndroidApplication(File)` instead.
153+
154+
New Features
155+
~~~~~~~~~~~~
156+
157+
C/C++
158+
"""""
159+
160+
* Models-as-data alert provenance information has been extended to the C/C++ language. Any qltests that include the edges relation in their output (for example, :code:`.qlref`\ s that reference path-problem queries) will need to be have their expected output updated accordingly.
161+
* Added subclasses of :code:`BuiltInOperations` for :code:`__builtin_has_attribute`, :code:`__builtin_is_corresponding_member`, :code:`__builtin_is_pointer_interconvertible_with_class`, :code:`__is_assignable_no_precondition_check`, :code:`__is_bounded_array`, :code:`__is_convertible`, :code:`__is_corresponding_member`, :code:`__is_nothrow_convertible`, :code:`__is_pointer_interconvertible_with_class`, :code:`__is_referenceable`, :code:`__is_same_as`, :code:`__is_trivially_copy_assignable`, :code:`__is_unbounded_array`, :code:`__is_valid_winrt_type`, :code:`_is_win_class`, :code:`__is_win_interface`, :code:`__reference_binds_to_temporary`, :code:`__reference_constructs_from_temporary`, and :code:`__reference_converts_from_temporary`.
162+
* The class :code:`NewArrayExpr` adds a predicate :code:`getArraySize()` to allow a more convenient way to access the static size of the array when the extent is missing.
163+
164+
Java and Kotlin
165+
"""""""""""""""
166+
167+
* Kotlin support is now out of beta, and generally available
168+
* Kotlin versions up to 2.0.2*x* are now supported.
169+
170+
Swift
171+
"""""
172+
173+
* Swift support is now out of beta, and generally available.

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.18.1
1415
codeql-cli-2.18.0
1516
codeql-cli-2.17.6
1617
codeql-cli-2.17.5

0 commit comments

Comments
 (0)