mirror of
https://github.com/github/codeql.git
synced 2026-07-14 07:48:16 +02:00
25 lines
806 B
Plaintext
25 lines
806 B
Plaintext
/**
|
|
* @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/cwe/cwe-078
|
|
* external/cwe/cwe-088
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.security.dataflow.CommandInjectionQuery
|
|
import CommandInjectionFlow::PathGraph
|
|
|
|
from CommandInjectionFlow::PathNode source, CommandInjectionFlow::PathNode sink
|
|
where CommandInjectionFlow::flowPath(source, sink)
|
|
select sink.getNode(), source, sink, "This command line depends on a $@.", source.getNode(),
|
|
"user-provided value"
|