Skip to content

Commit 543c31f

Browse files
committed
Merge remote-tracking branch 'origin/main' into redsun82/just2
2 parents 223487a + dfa8d72 commit 543c31f

File tree

141 files changed

+1964
-643
lines changed

Some content is hidden

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

141 files changed

+1964
-643
lines changed

MODULE.bazel

Lines changed: 1 addition & 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")

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
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include "conftest.h"
2+
3+
int main2() {
4+
strlen(""); // GOOD: conftest files are ignored
5+
return 0;
6+
}

0 commit comments

Comments
 (0)