Skip to content

Commit 63a3054

Browse files
committed
os.Args variable read
1 parent 2cbb072 commit 63a3054

File tree

1 file changed

+6
-0
lines changed
  • go/ql/lib/semmle/go/frameworks/stdlib

1 file changed

+6
-0
lines changed

go/ql/lib/semmle/go/frameworks/stdlib/Os.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,10 @@ module Os {
4343
input = inp and output = outp
4444
}
4545
}
46+
47+
private class ArgsSource extends SourceNode {
48+
ArgsSource() { exists(Variable v | v.hasQualifiedName("os", "Args") | this = v.getARead()) }
49+
50+
override string getThreatModel() { result = "commandargs" }
51+
}
4652
}

0 commit comments

Comments
 (0)