Skip to content

Commit 24e314a

Browse files
authored
Merge pull request #22266 from JarLob/improve/actions-cache-poisoning-code-injection-wording
Actions: Improve actions cache poisoning code injection wording
2 parents 1c0ae0f + caf91c9 commit 24e314a

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

actions/ql/src/Security/CWE-349/CachePoisoningViaCodeInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @name Cache Poisoning via low-privileged code injection
2+
* @name Cache Poisoning via code injection
33
* @description The cache can be poisoned by untrusted code, leading to a cache poisoning attack.
44
* @kind path-problem
55
* @problem.severity error
@@ -27,5 +27,5 @@ where
2727
check.protects(source.getNode().asExpr(), event, "code-injection")
2828
)
2929
select sink.getNode(), source, sink,
30-
"Unprivileged code injection in $@, which may lead to cache poisoning ($@).", sink,
30+
"Code injection in $@ may allow poisoning the default-branch cache (event trigger: $@).", sink,
3131
sink.getNode().asExpr().(Expression).getRawExpression(), event, event.getName()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: queryMetadata
3+
---
4+
* The name and alert message of the `actions/cache-poisoning/code-injection` query have been reworded for clarity.

actions/ql/test/query-tests/Security/CWE-349/CachePoisoningViaCodeInjection.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ nodes
77
| .github/workflows/neg_code_injection1.yml:11:17:11:48 | github.event.comment.body | semmle.label | github.event.comment.body |
88
subpaths
99
#select
10-
| .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | Unprivileged code injection in $@, which may lead to cache poisoning ($@). | .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | ${{ github.event.comment.body }} | .github/workflows/code_injection1.yml:2:3:2:15 | issue_comment | issue_comment |
10+
| .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | Code injection in $@ may allow poisoning the default-branch cache (event trigger: $@). | .github/workflows/code_injection1.yml:11:17:11:48 | github.event.comment.body | ${{ github.event.comment.body }} | .github/workflows/code_injection1.yml:2:3:2:15 | issue_comment | issue_comment |

0 commit comments

Comments
 (0)