mirror of
https://github.com/github/codeql.git
synced 2026-06-24 22:27:03 +02:00
Also changed the definition of a relevant call-target, so it's only what is in the actual source code, which is what we want in the future! (so what we're designing type-tracking to handle) I also changed terminology from `callee` to `target`. It felt more natural this way in my opinion.
36 lines
1019 B
Plaintext
36 lines
1019 B
Plaintext
/**
|
|
* @name Call graph edge overview from using type-tracking instead of points-to
|
|
* @id py/meta/call-graph-overview
|
|
* @precision very-low
|
|
*/
|
|
|
|
import python
|
|
import CallGraphQuality
|
|
|
|
from string tag, int c
|
|
where
|
|
tag = "SHARED" and
|
|
c =
|
|
count(CallNode call, Target target |
|
|
target.isRelevant() and
|
|
call.(PointsToBasedCallGraph::ResolvableCall).getTarget() = target and
|
|
call.(TypeTrackingBasedCallGraph::ResolvableCall).getTarget() = target
|
|
)
|
|
or
|
|
tag = "NEW" and
|
|
c =
|
|
count(CallNode call, Target target |
|
|
target.isRelevant() and
|
|
not call.(PointsToBasedCallGraph::ResolvableCall).getTarget() = target and
|
|
call.(TypeTrackingBasedCallGraph::ResolvableCall).getTarget() = target
|
|
)
|
|
or
|
|
tag = "MISSING" and
|
|
c =
|
|
count(CallNode call, Target target |
|
|
target.isRelevant() and
|
|
call.(PointsToBasedCallGraph::ResolvableCall).getTarget() = target and
|
|
not call.(TypeTrackingBasedCallGraph::ResolvableCall).getTarget() = target
|
|
)
|
|
select tag, c
|