Skip to content

Commit bcf612e

Browse files
authored
Merge branch 'main' into compwidertype2
2 parents 201af3f + dfa8d72 commit bcf612e

File tree

151 files changed

+2001
-650
lines changed

Some content is hidden

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

151 files changed

+2001
-650
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ repos:
77
rev: v3.2.0
88
hooks:
99
- id: trailing-whitespace
10-
exclude: /test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
10+
exclude: /test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
1111
- id: end-of-file-fixer
12-
exclude: Cargo.lock$|/test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
12+
exclude: Cargo.lock$|/test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
1313

1414
- repo: https://github.com/pre-commit/mirrors-clang-format
1515
rev: v17.0.6

MODULE.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ bazel_dep(name = "abseil-cpp", version = "20260107.1", repo_name = "absl")
2727
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
2828
bazel_dep(name = "fmt", version = "12.1.0-codeql.1")
2929
bazel_dep(name = "rules_kotlin", version = "2.2.2-codeql.1")
30-
bazel_dep(name = "gazelle", version = "0.47.0")
30+
bazel_dep(name = "gazelle", version = "0.50.0")
3131
bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1")
3232
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
3333
bazel_dep(name = "rules_rust", version = "0.69.0")
@@ -242,6 +242,7 @@ use_repo(
242242
"kotlin-compiler-2.2.0-Beta1",
243243
"kotlin-compiler-2.2.20-Beta2",
244244
"kotlin-compiler-2.3.0",
245+
"kotlin-compiler-2.3.20",
245246
"kotlin-compiler-embeddable-1.8.0",
246247
"kotlin-compiler-embeddable-1.9.0-Beta",
247248
"kotlin-compiler-embeddable-1.9.20-Beta",
@@ -252,6 +253,7 @@ use_repo(
252253
"kotlin-compiler-embeddable-2.2.0-Beta1",
253254
"kotlin-compiler-embeddable-2.2.20-Beta2",
254255
"kotlin-compiler-embeddable-2.3.0",
256+
"kotlin-compiler-embeddable-2.3.20",
255257
"kotlin-stdlib-1.8.0",
256258
"kotlin-stdlib-1.9.0-Beta",
257259
"kotlin-stdlib-1.9.20-Beta",
@@ -262,6 +264,7 @@ use_repo(
262264
"kotlin-stdlib-2.2.0-Beta1",
263265
"kotlin-stdlib-2.2.20-Beta2",
264266
"kotlin-stdlib-2.3.0",
267+
"kotlin-stdlib-2.3.20",
265268
)
266269

267270
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")

actions/ql/src/Security/CWE-829/ArtifactPoisoningCritical.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ from ArtifactPoisoningFlow::PathNode source, ArtifactPoisoningFlow::PathNode sin
2020
where
2121
ArtifactPoisoningFlow::flowPath(source, sink) and
2222
event = getRelevantEventInPrivilegedContext(sink.getNode())
23-
select sink.getNode(), source, sink,
24-
"Potential artifact poisoning in $@, which may be controlled by an external user ($@).", sink,
25-
sink.getNode().toString(), event, event.getName()
23+
select source.getNode(), source, sink,
24+
"Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user ($@).",
25+
event, event.getName()

actions/ql/src/Security/CWE-829/ArtifactPoisoningMedium.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ from ArtifactPoisoningFlow::PathNode source, ArtifactPoisoningFlow::PathNode sin
2020
where
2121
ArtifactPoisoningFlow::flowPath(source, sink) and
2222
inNonPrivilegedContext(sink.getNode().asExpr())
23-
select sink.getNode(), source, sink,
24-
"Potential artifact poisoning in $@, which may be controlled by an external user.", sink,
25-
sink.getNode().toString()
23+
select source.getNode(), source, sink,
24+
"Potential artifact poisoning; the artifact being consumed has contents that may be controlled by an external user."
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: majorAnalysis
3+
---
4+
* Fixed alert messages in `actions/artifact-poisoning/critical` and `actions/artifact-poisoning/medium` as they previously included a redundant placeholder in the alert message that would on occasion contain a long block of yml that makes the alert difficult to understand. Also clarify the wording to make it clear that it is not the artifact that is being poisoned, but instead a potentially untrusted artifact that is consumed. Also change the alert location to be the source, to align more with other queries reporting an artifact (e.g. zipslip) which is more useful.

actions/ql/test/query-tests/Security/CWE-829/ArtifactPoisoningCritical.expected

Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: feature
3+
---
4+
* Added a subclass `AutoconfConfigureTestFile` of `ConfigurationTestFile` that represents files created by GNU autoconf configure scripts to test the build configuration.

cpp/ql/lib/semmle/code/cpp/ConfigurationTestFile.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,10 @@ class MesonPrivateTestFile extends ConfigurationTestFile {
4242
)
4343
}
4444
}
45+
46+
/**
47+
* A file created by a GNU autoconf configure script to test the system configuration.
48+
*/
49+
class AutoconfConfigureTestFile extends ConfigurationTestFile {
50+
AutoconfConfigureTestFile() { this.getBaseName().regexpMatch("conftest[0-9]*\\.c(pp)?") }
51+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| conftest.c.c:4:3:4:8 | call to strlen | This expression has no effect (because $@ has no external side effects). | conftest.h:3:8:3:13 | strlen | strlen |
2+
| conftest_abc.c:4:3:4:8 | call to strlen | This expression has no effect (because $@ has no external side effects). | conftest.h:3:8:3:13 | strlen | strlen |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Likely Bugs/Likely Typos/ExprHasNoEffect.ql

0 commit comments

Comments
 (0)