JS: Exclude externs from CallGraph meta-query

This commit is contained in:
Asger F
2025-04-11 12:52:39 +02:00
parent 860b3d76a8
commit 5064cd5d94

View File

@@ -12,7 +12,10 @@ import javascript
from DataFlow::Node invoke, Function f, string kind
where
invoke.(DataFlow::InvokeNode).getACallee() = f and kind = "Call"
or
invoke.(DataFlow::PropRef).getAnAccessorCallee().getFunction() = f and kind = "Accessor call"
(
invoke.(DataFlow::InvokeNode).getACallee() = f and kind = "Call"
or
invoke.(DataFlow::PropRef).getAnAccessorCallee().getFunction() = f and kind = "Accessor call"
) and
not f.getTopLevel().isExterns()
select invoke, kind + " to $@", f, f.describe()