Skip to content

Commit 5e0ef92

Browse files
committed
adding Start-Process as sink
1 parent b3dbe20 commit 5e0ef92

File tree

3 files changed

+120
-96
lines changed

3 files changed

+120
-96
lines changed

powershell/ql/lib/semmle/code/powershell/security/CommandInjectionCustomizations.qll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ module CommandInjection {
6060
override string getSinkType() { result = "call to Invoke-Expression" }
6161
}
6262

63+
class StartProcessSink extends Sink {
64+
StartProcessSink(){
65+
exists(DataFlow::CallNode call |
66+
call.matchesName("Start-Process") and
67+
call.getAnArgument() = this
68+
)
69+
}
70+
override string getSinkType(){ result = "call to Start-Process"}
71+
}
72+
6373
class AddTypeSink extends Sink {
6474
AddTypeSink() {
6575
exists(DataFlow::CallNode call |

0 commit comments

Comments
 (0)