Files
codeql/csharp/ql/test/library-tests/frameworks/JsonNET/Json.ql
Erik Krogh Kristensen ff73dbc35c delete redundant imports
2022-04-22 12:55:28 +02:00

18 lines
503 B
Plaintext

import csharp
class Configuration extends TaintTracking::Configuration {
Configuration() { this = "Json.NET test" }
override predicate isSource(DataFlow::Node src) {
src.asExpr().(StringLiteral).getValue() = "tainted"
}
override predicate isSink(DataFlow::Node sink) {
exists(MethodCall c | c.getArgument(0) = sink.asExpr() and c.getTarget().getName() = "Sink")
}
}
from Configuration c, DataFlow::Node source, DataFlow::Node sink
where c.hasFlow(source, sink)
select source, sink