Skip to content

Commit 991a5d6

Browse files
committed
1 parent 7dc3fdf commit 991a5d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/ShellCommandInjectionFromEnvironmentQuery.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ module ShellCommandInjectionFromEnvironmentConfig implements DataFlow::ConfigSig
3131
predicate observeDiffInformedIncrementalMode() { any() }
3232

3333
Location getASelectedSinkLocation(DataFlow::Node sink) {
34-
exists(DataFlow::Node node |
35-
isSinkWithHighlight(sink, node) and
36-
result = node.getLocation()
34+
exists(DataFlow::Node highlight | result = highlight.getLocation() |
35+
if isSinkWithHighlight(sink, _)
36+
then isSinkWithHighlight(sink, highlight)
37+
else highlight = sink
3738
)
3839
}
3940
}

0 commit comments

Comments
 (0)