Skip to content

Commit c18db91

Browse files
committed
PS: Model 'inputfile' as a sink for SQL injections.
1 parent b82bd2c commit c18db91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ module SqlInjection {
4040
exists(DataFlow::CallNode call | call.matchesName("Invoke-Sqlcmd") |
4141
this = call.getNamedArgument("query")
4242
or
43+
this = call.getNamedArgument("inputfile")
44+
or
4345
not call.hasNamedArgument("query") and
46+
not call.hasNamedArgument("inputfile") and
4447
this = call.getArgument(0)
4548
)
4649
}

0 commit comments

Comments
 (0)