python: Add summary nodes

allowing more `OutNode`s (not restricting to `CallNode`s),
gives more flow in the `classesCallGraph` test
This commit is contained in:
Rasmus Lerchedahl Petersen
2022-04-01 16:18:11 +02:00
committed by GitHub
parent 80175a9af5
commit 828db3a392
7 changed files with 147 additions and 22 deletions

View File

@@ -35,7 +35,7 @@ class MaximalFlowsConfig extends DataFlow::Configuration {
override predicate isSink(DataFlow::Node node) {
exists(node.getLocation().getFile().getRelativePath()) and
not any(CallNode c).getArg(_) = node.asCfgNode() and
not node instanceof DataFlow::ArgumentNode and
not node instanceof DataFlow::ArgumentSourceNode and
not node.asCfgNode().(NameNode).getId().matches("SINK%") and
not exists(DataFlow::Node succ | DataFlow::localFlowStep(node, succ))
}

View File

@@ -42,7 +42,7 @@ abstract class RoutingTest extends InlineExpectationsTest {
}
pragma[inline]
private string fromFunc(DataFlow::ArgumentNode fromNode) {
private string fromFunc(DataFlow::ArgumentSourceNode fromNode) {
result = fromNode.getCall().getNode().(CallNode).getFunction().getNode().(Name).getId()
}