mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
22 lines
541 B
Plaintext
22 lines
541 B
Plaintext
/**
|
|
* @kind path-problem
|
|
*/
|
|
|
|
import csharp
|
|
import DataFlow
|
|
import DataFlow::PathGraph
|
|
|
|
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 DataFlow::PathNode source, DataFlow::PathNode sink, FlowConfig config
|
|
where config.hasFlowPath(source, sink)
|
|
select source, sink, sink, "$@", sink, sink.toString()
|