Python: Port py/meta/call-graph

This commit is contained in:
Rasmus Wriedt Larsen
2022-08-24 10:45:08 +02:00
parent 7c1320ed4b
commit f2e92bf963

View File

@@ -1,9 +1,9 @@
/**
* @name Call graph
* @description An edge in the points-to call graph.
* @description An edge in the call graph.
* @kind problem
* @problem.severity recommendation
* @id py/meta/points-to-call-graph
* @id py/meta/call-graph
* @tags meta
* @precision very-low
*/
@@ -11,6 +11,6 @@
import python
import semmle.python.dataflow.new.internal.DataFlowPrivate
from DataFlowCall c, DataFlowCallableValue f
where c.getCallable() = f
select c, "Call to $@", f.getScope(), f.toString()
from DataFlowCall call, DataFlowCallable target
where target = viableCallable(call)
select call, "Call to $@", target.getScope(), target.toString()