mirror of
https://github.com/github/codeql.git
synced 2026-07-30 23:13:01 +02:00
26 lines
819 B
Plaintext
Executable File
26 lines
819 B
Plaintext
Executable File
/**
|
|
* @name Uncontrolled command line
|
|
* @description Using externally controlled strings in a command line may allow a malicious
|
|
* user to change the meaning of the command.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @security-severity 9.8
|
|
* @sub-severity high
|
|
* @precision high
|
|
* @id py/command-line-injection
|
|
* @tags correctness
|
|
* security
|
|
* external/owasp/owasp-a1
|
|
* external/cwe/cwe-078
|
|
* external/cwe/cwe-088
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.security.dataflow.CommandInjection
|
|
import DataFlow::PathGraph
|
|
|
|
from CommandInjectionConfiguration config, DataFlow::PathNode source, DataFlow::PathNode sink
|
|
where config.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "This command depends on $@.", source.getNode(),
|
|
"a user-provided value"
|