Skip to content

Commit 28af21c

Browse files
author
Alvaro Muñoz
committed
Update ql suites
1 parent fa05b68 commit 28af21c

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

ql/lib/codeql/actions/security/EnvPathInjectionQuery.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ class EnvPathInjectionFromFileReadSink extends EnvPathInjectionSink {
1313
this.asExpr() = run.getScriptScalar() and
1414
step.getAFollowingStep() = run and
1515
writeToGitHubPath(run, value) and
16-
// TODO: add support for other commands like `<`, `jq`, ...
17-
value.regexpMatch(["\\$\\(", "`"] + ["cat\\s+", "<"] + ".*" + ["`", "\\)"])
16+
// (eg: echo DATABASE_SHA=`yq '.creationMetadata.sha' codeql-database.yml` >> $GITHUB_ENV)
17+
value
18+
.regexpMatch(["\\$\\(", "`"] + ["cat\\s+", "<", "jq\\s+", "yq\\s+"] + ".*" + ["`", "\\)"])
1819
)
1920
}
2021
}

ql/lib/codeql/actions/security/EnvVarInjectionQuery.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ class EnvVarInjectionFromFileReadSink extends EnvVarInjectionSink {
2626
step.getAFollowingStep() = run and
2727
writeToGitHubEnv(run, content) and
2828
extractVariableAndValue(content, _, value) and
29-
// TODO: add support for other commands like `<`, `jq`, ...
30-
value.regexpMatch(["\\$\\(", "`"] + ["cat\\s+", "<"] + ".*" + ["`", "\\)"])
29+
// (eg: echo DATABASE_SHA=`yq '.creationMetadata.sha' codeql-database.yml` >> $GITHUB_ENV)
30+
value
31+
.regexpMatch(["\\$\\(", "`"] + ["cat\\s+", "<", "jq\\s+", "yq\\s+"] + ".*" + ["`", "\\)"])
3132
)
3233
}
3334
}

ql/src/Debug/partial.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* @precision low
66
* @problem.severity error
77
* @id actions/test-dataflow
8+
* @tags actions
9+
* debug
810
*/
911

1012
import actions

ql/src/codeql-suites/actions-all.qls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
kind:
55
- problem
66
- path-problem
7+
- exclude:
8+
tags contain:
9+
- debug
10+
- model-generator

ql/src/codeql-suites/actions-code-scanning.qls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717
tags contain:
1818
- experimental
1919
- testing
20+
- debug
21+
- model-generator

0 commit comments

Comments
 (0)