mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
26 lines
615 B
Plaintext
26 lines
615 B
Plaintext
/**
|
|
* @kind path-problem
|
|
*/
|
|
|
|
import csharp
|
|
import DataFlow::PathGraph
|
|
|
|
class Conf extends DataFlow::Configuration {
|
|
Conf() { this = "TuplesConf" }
|
|
|
|
override predicate isSource(DataFlow::Node src) {
|
|
src.asExpr().(StringLiteral).getValue() = "taint source"
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node sink) {
|
|
exists(MethodCall mc |
|
|
mc.getTarget().hasUndecoratedName("Sink") and
|
|
mc.getAnArgument() = sink.asExpr()
|
|
)
|
|
}
|
|
}
|
|
|
|
from DataFlow::PathNode source, DataFlow::PathNode sink, Conf conf
|
|
where conf.hasFlowPath(source, sink)
|
|
select source, source, sink, "$@", sink, sink.toString()
|