mirror of
https://github.com/github/codeql.git
synced 2026-01-12 06:00:23 +01:00
30 lines
1011 B
Plaintext
30 lines
1011 B
Plaintext
/**
|
|
* Provides a taint-tracking configuration for detecting "Xpath Injection" vulnerabilities.
|
|
*
|
|
* Note, for performance reasons: only import this file if
|
|
* `XpathInjection::Configuration` is needed, otherwise
|
|
* `XpathInjectionCustomizations` should be imported instead.
|
|
*/
|
|
|
|
private import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
import semmle.python.dataflow.new.TaintTracking
|
|
import XpathInjectionCustomizations::XpathInjection
|
|
|
|
/**
|
|
* A taint-tracking configuration for detecting "Xpath Injection" vulnerabilities.
|
|
*/
|
|
class Configuration extends TaintTracking::Configuration {
|
|
Configuration() { this = "Xpath Injection" }
|
|
|
|
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
|
|
}
|
|
}
|