Files
codeql/java/ql/test/kotlin/library-tests/dataflow/stmtexpr/test.ql
2022-05-10 19:51:18 +01:00

19 lines
510 B
Plaintext

import java
import semmle.code.java.dataflow.DataFlow
class Conf extends DataFlow::Configuration {
Conf() { this = "qltest:exprStmtFlow" }
override predicate isSource(DataFlow::Node n) {
n.asExpr().(ClassInstanceExpr).getType().(RefType).getASupertype*().hasName("Source")
}
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