mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
allow parameters that end with "Command" in js/shell-command-constructed-from-input
This commit is contained in:
@@ -53,7 +53,12 @@ module UnsafeShellCommandConstruction {
|
||||
class ExternalInputSource extends Source, DataFlow::ParameterNode {
|
||||
ExternalInputSource() {
|
||||
this = Exports::getALibraryInputParameter() and
|
||||
not this.getName() = ["cmd", "command"] // looks to be on purpose.
|
||||
not (
|
||||
// looks to be on purpose.
|
||||
this.getName() = ["cmd", "command"]
|
||||
or
|
||||
this.getName().regexpMatch(".*(Cmd|Command)$") // ends with "Cmd" or "Command"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user