Skip to content

Commit 1ff04d9

Browse files
committed
PS: Add new false negative.
1 parent 72178f0 commit 1ff04d9

File tree

1 file changed

+12
-1
lines changed
  • powershell/ql/test/query-tests/security/cwe-089

1 file changed

+12
-1
lines changed

powershell/ql/test/query-tests/security/cwe-089/test.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,15 @@ $QueryConn = @{
6767
Query = ""
6868
}
6969

70-
Invoke-Sqlcmd @QueryConn # GOOD
70+
Invoke-Sqlcmd @QueryConn # GOOD
71+
72+
$QueryConn2 = @{
73+
Database = "MyDB"
74+
ServerInstance = "MyServer"
75+
Username = "MyUserName"
76+
Password = "MyPassword"
77+
ConnectionTimeout = 0
78+
Query = $userinput
79+
}
80+
81+
Invoke-Sqlcmd @QueryConn2 # BAD [NOT DETECTED]

0 commit comments

Comments
 (0)