mirror of
https://github.com/github/codeql.git
synced 2026-02-23 18:33:42 +01:00
Fixes the test failures that arose from making `ExtractedArgumentNode` local. For the consistency checks, we now explicitly exclude the `ExtractedArgumentNode`s (now much more plentiful due to the overapproximation) that don't have a corresponding `getCallArg` tuple. For various queries/tests using `instanceof ArgumentNode`, we instead us `isArgumentNode`, which explicitly filters out the ones for which `isArgumentOf` doesn't hold (which, again, is the case for most of the nodes in the overapproximation).
23 lines
620 B
Plaintext
23 lines
620 B
Plaintext
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
|
|
DataFlowPrivate::isArgumentNode(node, _, _)
|
|
}
|
|
|
|
predicate isSink(DataFlow::Node node) {
|
|
node instanceof DataFlowPrivate::OutNode
|
|
or
|
|
node instanceof DataFlow::ParameterNode
|
|
}
|
|
}
|
|
|
|
module CallGraphFlow = DataFlow::Global<CallGraphConfig>;
|