mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Python: Move dataflow TestUtil to importable location
This commit is contained in:
22
python/ql/test/TestUtilities/dataflow/callGraphConfig.qll
Normal file
22
python/ql/test/TestUtilities/dataflow/callGraphConfig.qll
Normal 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>;
|
||||
Reference in New Issue
Block a user