mirror of
https://github.com/github/codeql.git
synced 2026-02-18 07:53:43 +01:00
30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
/**
|
|
* Provides a taint-tracking configuration for detecting "command injection" vulnerabilities.
|
|
*
|
|
* Note, for performance reasons: only import this file if
|
|
* `CommandInjection::Configuration` is needed, otherwise
|
|
* `CommandInjectionCustomizations` should be imported instead.
|
|
*/
|
|
|
|
private import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
import semmle.python.dataflow.new.TaintTracking
|
|
import CommandInjectionCustomizations::CommandInjection
|
|
|
|
/**
|
|
* A taint-tracking configuration for detecting "command injection" vulnerabilities.
|
|
*/
|
|
class Configuration extends TaintTracking::Configuration {
|
|
Configuration() { this = "CommandInjection" }
|
|
|
|
override predicate isSource(DataFlow::Node source) { source instanceof Source }
|
|
|
|
override predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
|
|
|
|
override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer }
|
|
|
|
deprecated override predicate isSanitizerGuard(DataFlow::BarrierGuard guard) {
|
|
guard instanceof SanitizerGuard
|
|
}
|
|
}
|