Skip to content

Commit 5064cd5

Browse files
committed
JS: Exclude externs from CallGraph meta-query
1 parent 860b3d7 commit 5064cd5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

javascript/ql/src/meta/alerts/CallGraph.ql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import javascript
1212

1313
from DataFlow::Node invoke, Function f, string kind
1414
where
15-
invoke.(DataFlow::InvokeNode).getACallee() = f and kind = "Call"
16-
or
17-
invoke.(DataFlow::PropRef).getAnAccessorCallee().getFunction() = f and kind = "Accessor call"
15+
(
16+
invoke.(DataFlow::InvokeNode).getACallee() = f and kind = "Call"
17+
or
18+
invoke.(DataFlow::PropRef).getAnAccessorCallee().getFunction() = f and kind = "Accessor call"
19+
) and
20+
not f.getTopLevel().isExterns()
1821
select invoke, kind + " to $@", f, f.describe()

0 commit comments

Comments
 (0)