python: make DataFlowCall "publicly usable"

- add `getCallable`, `getArg` and `getNode`
- these are `none` for summary calls
- revert "external" uses (they had been changed to `DataFlowSourceCall`)
This commit is contained in:
yoff
2022-06-23 08:32:23 +00:00
committed by GitHub
parent dd69100dcd
commit cedf9ef538
6 changed files with 27 additions and 15 deletions

View File

@@ -69,7 +69,7 @@ class ExternalApiDataNode extends DataFlow::Node {
int i;
ExternalApiDataNode() {
exists(DataFlowPrivate::DataFlowSourceCall call |
exists(DataFlowPrivate::DataFlowCall call |
exists(call.getLocation().getFile().getRelativePath())
|
callable = call.getCallable() and

View File

@@ -11,6 +11,6 @@
import python
import semmle.python.dataflow.new.internal.DataFlowPrivate
from DataFlowSourceCall c, DataFlowCallableValue f
from DataFlowCall c, DataFlowCallableValue f
where c.getCallable() = f
select c, "Call to $@", f.getScope(), f.toString()