Skip to content

Commit 1a108fb

Browse files
committed
Changed to for constant string
1 parent 7c235e3 commit 1a108fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ class UnSafeExecutable extends string {
9898
bindingset[this]
9999
UnSafeExecutable() {
100100
this.regexpMatch("^(|.*/)([a-z]*sh|javac?|python.*|perl|[Pp]ower[Ss]hell|php|node|deno|bun|ruby|osascript|cmd|Rscript|groovy)(\\.exe)?$") and
101-
not this.matches("netsh.exe")
101+
not this = "netsh.exe"
102102
}
103103
}

0 commit comments

Comments
 (0)