Skip to content

Commit 16ca231

Browse files
JarLoberik-krogh
andauthored
Apply suggestions from code review
Co-authored-by: Erik Krogh Kristensen <[email protected]>
1 parent 673e649 commit 16ca231

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

javascript/ql/src/experimental/Security/CWE-829/expression_injection.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @name Injection from user-controlled Actions context
2+
* @name Expression injection in Actions
33
* @description Using user-controlled GitHub Actions contexts like `run:` or `script:` may allow a malicious
44
* user to inject code into the GitHub action.
55
* @kind problem

javascript/ql/src/experimental/Security/CWE-829/pull_request_target.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @name pull_request_target with explicit pull request checkout
3-
* @description Workflows triggered on `pull_request_target` have read/write tokens for the base repository and the access to secrets.
2+
* @name Checkout of untrusted code in trusted context
3+
* @description Workflows triggered on `pull_request_target` have read/write access to the base repository and access to secrets.
44
* By explicitly checking out and running the build script from a fork the untrusted code is running in an environment
55
* that is able to push to the base repository and to access secrets.
66
* @kind problem
@@ -119,4 +119,4 @@ where
119119
) and
120120
step instanceof ProbableStep and
121121
job instanceof ProbableJob
122-
select step, "Potential unsafe checkout of untrusted pull request on `pull_request_target`"
122+
select step, "Potential unsafe checkout of untrusted pull request on `pull_request_target`"

javascript/ql/src/experimental/semmle/javascript/Actions.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import javascript
1212
module Actions {
1313
/** A YAML node in a GitHub Actions workflow file. */
1414
private class Node extends YAMLNode {
15-
Node() { this.getLocation().getFile().getRelativePath().matches(".github/workflows/%") }
15+
Node() { this.getLocation().getFile().getRelativePath().matches(["experimental/Security/CWE-829/.github/workflows/%", ".github/workflows/%"]) }
1616
}
1717

1818
/**

0 commit comments

Comments
 (0)