Skip to content

Commit db0bbd8

Browse files
committed
JS: Exclude externs from CallGraph meta-query
1 parent 03b3b93 commit db0bbd8

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

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)