mirror of
https://github.com/github/codeql.git
synced 2026-03-23 07:56:54 +01:00
21 lines
502 B
Plaintext
21 lines
502 B
Plaintext
import csharp
|
|
|
|
class Config extends DataFlow::Configuration {
|
|
Config() { this = "Config" }
|
|
|
|
override predicate isSource(DataFlow::Node source) {
|
|
source.asExpr().(StringLiteral).getValue() = "taint source"
|
|
or
|
|
source.asParameter().hasName("tainted")
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node sink) {
|
|
sink.asExpr() instanceof Access
|
|
and
|
|
exists(MethodCall mc |
|
|
mc.getTarget().getName() = "Check" and
|
|
mc.getAnArgument() = sink.asExpr().getParent*()
|
|
)
|
|
}
|
|
}
|