mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Fix bug in argumentRoutingTest.ql
Since `DataFlowPrivate::DataFlowCall` only exists for calls resolved to a function, we didn't have any results before... but allowing any call helps things!
This commit is contained in:
@@ -22,10 +22,10 @@ class Argument1RoutingConfig extends DataFlow::Configuration {
|
||||
override predicate isSource(DataFlow::Node node) {
|
||||
node.(DataFlow::CfgNode).getNode().(NameNode).getId() = "arg1"
|
||||
or
|
||||
exists(AssignmentDefinition def, DataFlowPrivate::DataFlowCall call |
|
||||
exists(AssignmentDefinition def, DataFlow::CallCfgNode call |
|
||||
def.getVariable() = node.(DataFlow::EssaNode).getVar() and
|
||||
def.getValue() = call.getNode() and
|
||||
call.getNode().(CallNode).getFunction().(NameNode).getId().matches("With\\_%")
|
||||
call.getFunction().asCfgNode().(NameNode).getId().matches("With\\_%")
|
||||
) and
|
||||
node.(DataFlow::EssaNode).getVar().getName().matches("with\\_%")
|
||||
}
|
||||
|
||||
@@ -506,7 +506,7 @@ class With_call:
|
||||
|
||||
|
||||
def test_call():
|
||||
with_call = With_call() #$ MISSING: arg1="SSA variable with_call" func=With_call.__call__
|
||||
with_call = With_call() #$ arg1="SSA variable with_call" func=With_call.__call__
|
||||
with_call()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user