mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
20 lines
551 B
Plaintext
20 lines
551 B
Plaintext
import java
|
|
import semmle.code.java.dataflow.TaintTracking
|
|
import semmle.code.java.dataflow.ExternalFlow
|
|
|
|
class Conf extends TaintTracking::Configuration {
|
|
Conf() { this = "qltest:foreach-array-iterator" }
|
|
|
|
override predicate isSource(DataFlow::Node n) {
|
|
n.asExpr().(Argument).getCall().getCallee().hasName("taint")
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node n) {
|
|
n.asExpr().(Argument).getCall().getCallee().hasName("sink")
|
|
}
|
|
}
|
|
|
|
from DataFlow::Node src, DataFlow::Node sink, Conf conf
|
|
where conf.hasFlow(src, sink)
|
|
select src, sink
|