mirror of
https://github.com/github/codeql.git
synced 2026-04-15 20:14:02 +02:00
24 lines
803 B
Plaintext
24 lines
803 B
Plaintext
/**
|
|
* Provides a taint-tracking configuration for detecting "XML bomb" vulnerabilities.
|
|
*
|
|
* Note, for performance reasons: only import this file if
|
|
* `Configuration` is needed, otherwise
|
|
* `XmlBombCustomizations` should be imported instead.
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
import semmle.python.dataflow.new.TaintTracking
|
|
import XmlBombCustomizations::XmlBomb
|
|
|
|
private module XmlBombConfig implements DataFlow::ConfigSig {
|
|
predicate isSource(DataFlow::Node source) { source instanceof Source }
|
|
|
|
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
|
|
|
|
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
|
|
}
|
|
|
|
/** Global taint-tracking for detecting "XML bomb" vulnerabilities. */
|
|
module XmlBombFlow = TaintTracking::Global<XmlBombConfig>;
|