Skip to content

Commit a54e810

Browse files
committed
JS: Include accessor-calls in CallGraph.ql
1 parent f4a476e commit a54e810

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import javascript
1212

13-
from DataFlow::InvokeNode invoke, Function f
14-
where invoke.getACallee() = f
15-
select invoke, "Call to $@", f, f.describe()
13+
from DataFlow::Node invoke, Function f, string kind
14+
where invoke.(DataFlow::InvokeNode).getACallee() = f and kind = "Call" or
15+
invoke.(DataFlow::PropRef).getAnAccessorCallee().getFunction() = f and kind = "Accessor call"
16+
select invoke, kind + " to $@", f, f.describe()

0 commit comments

Comments
 (0)