Skip to content

Commit ddf72a2

Browse files
author
Alvaro Muñoz
committed
Add more poisonable steps
1 parent e8f2bc3 commit ddf72a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,19 @@ class LocalCommandExecutionRunStep extends PoisonableStep, Run {
4343
or
4444
// sh xxxx
4545
cmd = line.regexpCapture("(^|\\s+)(ba|z|fi)?sh\\s+(.*)", 3)
46+
or
47+
// node xxxx
48+
cmd = line.regexpCapture("(^|\\s+)(node|python|ruby|go)\\s+(.*)", 3)
4649
)
4750
}
4851

4952
string getCommand() { result = cmd }
5053
}
5154

55+
class LocalActionUsesStep extends PoisonableStep, UsesStep {
56+
LocalActionUsesStep() { this.getCallee().matches("./%") }
57+
}
58+
5259
class EnvVarInjectionRunStep extends PoisonableStep, Run {
5360
EnvVarInjectionRunStep() {
5461
exists(string value |

0 commit comments

Comments
 (0)