Skip to content

Commit bcf0c22

Browse files
committed
Merge branch 'main' of https://github.com/github/codeql into post-release-prep/codeql-cli-2.26.2
2 parents 21c2c97 + a8a77a6 commit bcf0c22

163 files changed

Lines changed: 3535 additions & 9609 deletions

File tree

Some content is hidden

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

Cargo.lock

Lines changed: 2 additions & 307 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ members = [
99
"shared/yeast-schema",
1010
"ruby/extractor",
1111
"unified/extractor",
12-
"unified/extractor/tree-sitter-swift",
1312
"unified/swift-syntax-rs",
1413
"rust/extractor",
1514
"rust/extractor/macros",

MODULE.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ use_repo(
109109
tree_sitter_extractors_deps,
110110
"vendor_ts__anyhow-1.0.100",
111111
"vendor_ts__argfile-0.2.1",
112-
"vendor_ts__cc-1.2.61",
113112
"vendor_ts__chalk-ir-0.104.0",
114113
"vendor_ts__chrono-0.4.42",
115114
"vendor_ts__clap-4.5.48",
@@ -157,9 +156,7 @@ use_repo(
157156
"vendor_ts__tracing-subscriber-0.3.20",
158157
"vendor_ts__tree-sitter-0.26.8",
159158
"vendor_ts__tree-sitter-embedded-template-0.25.0",
160-
"vendor_ts__tree-sitter-generate-0.26.8",
161159
"vendor_ts__tree-sitter-json-0.24.8",
162-
"vendor_ts__tree-sitter-language-0.1.5",
163160
"vendor_ts__tree-sitter-python-0.23.6",
164161
"vendor_ts__tree-sitter-ql-0.23.1",
165162
"vendor_ts__tree-sitter-ruby-0.23.1",

defs.bzl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
codeql_platform = select({
2-
"@platforms//os:linux": "linux64",
3-
"@platforms//os:macos": "osx64",
4-
"@platforms//os:windows": "win64",
5-
})
1+
load("//misc/bazel:os.bzl", "codeql_platform_select")
2+
3+
codeql_platform = codeql_platform_select(
4+
linux64 = "linux64",
5+
linux_arm64 = "linux-arm64",
6+
osx64 = "osx64",
7+
win64 = "win64",
8+
)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
.. _codeql-cli-2.26.2:
2+
3+
==========================
4+
CodeQL 2.26.2 (2026-07-23)
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/application-security/>`__, `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.26.2 runs a total of 497 security queries when configured with the Default suite (covering 170 CWE). The Extended suite enables an additional 131 queries (covering 32 more CWE).
18+
19+
CodeQL CLI
20+
----------
21+
22+
Breaking Changes
23+
~~~~~~~~~~~~~~~~
24+
25+
* Removed support for parsing :code:`[[`\ -style links in alert messages. This was an undocumented legacy feature that allowed query authors to embed links inline in select clause message strings using :code:`[["text"|"url"]]` syntax. Queries should use :code:`$@` placeholder pairs instead.
26+
27+
Query Packs
28+
-----------
29+
30+
Minor Analysis Improvements
31+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
33+
C#
34+
""
35+
36+
* :code:`System.Web.HttpRequest.RawUrl` is no longer treated as a sanitizer for :code:`cs/web/unvalidated-url-redirection`, since it contains the un-normalized request line. This may lead to more results.
37+
38+
Query Metadata Changes
39+
~~~~~~~~~~~~~~~~~~~~~~
40+
41+
C/C++
42+
"""""
43+
44+
* Added the tag :code:`external/cwe/cwe-762` to :code:`cpp/new-free-mismatch`, and removed the tag :code:`external/cwe/cwe-401`. This better matches the behavior of the query.
45+
46+
C#
47+
""
48+
49+
* The query :code:`cs/useless-assignment-to-local` has been removed from the :code:`code-quality` suite, but it remains in the :code:`code-quality-extended` suite.
50+
51+
Language Libraries
52+
------------------
53+
54+
Major Analysis Improvements
55+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
56+
57+
Swift
58+
"""""
59+
60+
* Upgraded to allow analysis of Swift 6.3.3.
61+
62+
Minor Analysis Improvements
63+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
64+
65+
Golang
66+
""""""
67+
68+
* The function :code:`Rel` in :code:`path/filepath` was incorrectly considered a sanitizer for :code:`go/path-injection` and :code:`go/zipslip`. This has now been fixed, which may lead to more results for those queries.
69+
70+
Java/Kotlin
71+
"""""""""""
72+
73+
* Kotlin versions up to 2.4.10 are now supported.
74+
* :code:`java.io.File.getName()` is no longer treated as a complete sanitizer for :code:`java/path-injection`, since it does not remove a :code:`..` path component (for example :code:`new File("..").getName()` returns :code:`".."`). It is now only recognized as a sanitizer when combined with a subsequent check for :code:`..` components, which may result in new alerts.
75+
76+
GitHub Actions
77+
""""""""""""""
78+
79+
* Altered the logic of :code:`EnvironmentCheck` to make sure it is a check that protects only for non-toctou. This change will result in more results being found by the queries: :code:`actions/untrusted-checkout-toctou/high` and :code:`actions/untrusted-checkout-toctou/critical`.

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.26.2
1415
codeql-cli-2.26.1
1516
codeql-cli-2.26.0
1617
codeql-cli-2.25.6

docs/codeql/reusables/supported-frameworks.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ and the CodeQL library pack ``codeql/javascript-all`` (`changelog <https://githu
191191
react native, HTML framework
192192
request, Network communicator
193193
restify, Server
194+
Sails.js Action2 controllers, Server
194195
sequelize, Database
195196
socket.io, Network communicator
196197
sqlite3, Database

go/extractor/extractor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ func ExtractWithFlags(buildFlags []string, patterns []string, extractTests bool,
232232
// This should only cause some wasted time and not inconsistency because the names for
233233
// objects seen in this process should be the same each time.
234234

235-
log.Printf("Processing package %s.", pkg.PkgPath)
235+
slog.Debug("Processing package", "package", pkg.PkgPath)
236236

237237
if _, ok := pkgInfos[pkg.PkgPath]; !ok {
238238
pkgInfos[pkg.PkgPath] = toolchain.GetPkgInfo(pkg.PkgPath, modFlags...)
239239
}
240240

241-
log.Printf("Extracting types for package %s.", pkg.PkgPath)
241+
slog.Debug("Extracting types for package", "package", pkg.PkgPath)
242242

243243
tw, err := trap.NewWriter(pkg.PkgPath, pkg)
244244
if err != nil {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Added support for treating declared `inputs` properties in Sails Action2 controller files as remote flow sources. This may improve results for security queries such as `js/path-injection`.

javascript/ql/lib/semmle/javascript/frameworks/HttpFrameworks.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ import semmle.javascript.frameworks.Micro
77
import semmle.javascript.frameworks.Restify
88
import semmle.javascript.frameworks.Connect
99
import semmle.javascript.frameworks.Fastify
10+
import semmle.javascript.frameworks.Sails
1011
import semmle.javascript.frameworks.Spife

0 commit comments

Comments
 (0)