Python: Move dataflow TestUtil to importable location

This commit is contained in:
Rasmus Wriedt Larsen
2024-04-19 10:47:25 +02:00
parent e0e405bb31
commit bb00d6919a
35 changed files with 28 additions and 28 deletions

View File

@@ -0,0 +1,22 @@
private import python
import semmle.python.dataflow.new.DataFlow
private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate
/**
* A configuration to find the call graph edges.
*/
module CallGraphConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node node) {
node instanceof DataFlowPrivate::ReturnNode
or
node instanceof DataFlow::ArgumentNode
}
predicate isSink(DataFlow::Node node) {
node instanceof DataFlowPrivate::OutNode
or
node instanceof DataFlow::ParameterNode
}
}
module CallGraphFlow = DataFlow::Global<CallGraphConfig>;