mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
16 lines
463 B
Plaintext
16 lines
463 B
Plaintext
import csharp
|
|
|
|
module TaintConfig implements DataFlow::ConfigSig {
|
|
predicate isSource(DataFlow::Node src) { src.asExpr().(StringLiteral).getValue() = "tainted" }
|
|
|
|
predicate isSink(DataFlow::Node sink) {
|
|
exists(MethodCall c | c.getArgument(0) = sink.asExpr() and c.getTarget().getName() = "Sink")
|
|
}
|
|
}
|
|
|
|
module Taint = TaintTracking::Global<TaintConfig>;
|
|
|
|
from DataFlow::Node source, DataFlow::Node sink
|
|
where Taint::flow(source, sink)
|
|
select source, sink
|