mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Kotlin: Add a Kotlin 2 copy of the testsuite
This commit is contained in:
14
java/ql/test-kotlin2/library-tests/dataflow/func/test.ql
Normal file
14
java/ql/test-kotlin2/library-tests/dataflow/func/test.ql
Normal file
@@ -0,0 +1,14 @@
|
||||
import java
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
module Flow = TaintTracking::Global<Config>;
|
||||
|
||||
from DataFlow::Node src, DataFlow::Node sink
|
||||
where Flow::flow(src, sink)
|
||||
select src, sink
|
||||
Reference in New Issue
Block a user