mirror of
https://github.com/github/codeql.git
synced 2026-03-01 05:13:41 +01:00
19 lines
506 B
Plaintext
19 lines
506 B
Plaintext
import csharp
|
|
import semmle.code.csharp.dataflow.TaintTracking
|
|
|
|
class FlowConfig extends TaintTracking::Configuration {
|
|
FlowConfig() { this="FlowConfig" }
|
|
|
|
override predicate isSource(DataFlow::Node source) {
|
|
source.asExpr() instanceof Literal
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node sink) {
|
|
exists(LocalVariable decl | sink.asExpr()=decl.getInitializer())
|
|
}
|
|
}
|
|
|
|
from FlowConfig config, DataFlow::Node source, DataFlow::Node sink
|
|
where config.hasFlow(source, sink)
|
|
select source, sink
|