mirror of
https://github.com/github/codeql.git
synced 2026-02-24 10:53:49 +01:00
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
/** Provides taint tracking configurations to be used in remote XXE queries. */
|
|
|
|
import java
|
|
private import semmle.code.java.dataflow.FlowSources
|
|
private import semmle.code.java.dataflow.TaintTracking
|
|
private import semmle.code.java.security.XxeQuery
|
|
|
|
/**
|
|
* DEPRECATED: Use `XxeFlow` instead.
|
|
*
|
|
* A taint-tracking configuration for unvalidated remote user input that is used in XML external entity expansion.
|
|
*/
|
|
deprecated class XxeConfig extends TaintTracking::Configuration {
|
|
XxeConfig() { this = "XxeConfig" }
|
|
|
|
override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource }
|
|
|
|
override predicate isSink(DataFlow::Node sink) { sink instanceof XxeSink }
|
|
|
|
override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof XxeSanitizer }
|
|
|
|
override predicate isAdditionalTaintStep(DataFlow::Node n1, DataFlow::Node n2) {
|
|
any(XxeAdditionalTaintStep s).step(n1, n2)
|
|
}
|
|
}
|
|
|
|
/**
|
|
* A taint-tracking configuration for unvalidated remote user input that is used in XML external entity expansion.
|
|
*/
|
|
module XxeConfig implements DataFlow::ConfigSig {
|
|
predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource }
|
|
|
|
predicate isSink(DataFlow::Node sink) { sink instanceof XxeSink }
|
|
|
|
predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof XxeSanitizer }
|
|
|
|
predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
|
|
any(XxeAdditionalTaintStep s).step(n1, n2)
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Detect taint flow of unvalidated remote user input that is used in XML external entity expansion.
|
|
*/
|
|
module XxeFlow = TaintTracking::Global<XxeConfig>;
|