mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
remove regular expression that did nothing
This commit is contained in:
@@ -92,9 +92,7 @@ module UnsafeShellCommandConstruction {
|
||||
StringConcatEndingInCommandExecutionSink() {
|
||||
this = root.getALeaf() and
|
||||
root = isExecutedAsShellCommand(DataFlow::TypeBackTracker::end(), sys) and
|
||||
exists(string prev | prev = this.getPreviousLeaf().getStringValue() |
|
||||
prev.regexpMatch(".*\\s*('|\")?[0-9a-zA-Z/:_-]*")
|
||||
)
|
||||
exists(this.getPreviousLeaf().getStringValue()) // looks like a shell command construction that could be done safer, it has a known prefix
|
||||
}
|
||||
|
||||
override string getSinkType() { result = "string concatenation" }
|
||||
|
||||
Reference in New Issue
Block a user