Skip to content

Commit f87f720

Browse files
committed
PS: Remove 'inputfile' as an SQL injection sink.
1 parent 2e290d2 commit f87f720

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ module SqlInjection {
5757
exists(DataFlow::CallNode call | call.matchesName("Invoke-Sqlcmd") |
5858
this = call.getNamedArgument(query())
5959
or
60-
this = call.getNamedArgument(inputfile())
61-
or
60+
// If the input is not provided as a query parameter or an input file
61+
// parameter then it's the first argument.
6262
not call.hasNamedArgument(query()) and
6363
not call.hasNamedArgument(inputfile()) and
6464
this = call.getArgument(0)

0 commit comments

Comments
 (0)