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