mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
require arguments to be shell interpreted to be flagged by indirect-command-injection
This commit is contained in:
@@ -199,9 +199,13 @@ module IndirectCommandInjection {
|
||||
}
|
||||
|
||||
/**
|
||||
* A command argument to a function that initiates an operating system command.
|
||||
* A command argument to a function that initiates an operating system command as a shell invocation.
|
||||
*/
|
||||
private class SystemCommandExecutionSink extends Sink, DataFlow::ValueNode {
|
||||
SystemCommandExecutionSink() { this = any(SystemCommandExecution sys).getACommandArgument() }
|
||||
SystemCommandExecutionSink() {
|
||||
exists(SystemCommandExecution sys |
|
||||
sys.isShellInterpreted(this) and this = sys.getACommandArgument()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user