Skip to content

Commit 1750624

Browse files
committed
JS: IndirectCommandInjection
1 parent aeba0f5 commit 1750624

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,12 @@ module IndirectCommandInjectionConfig implements DataFlow::ConfigSig {
2929

3030
predicate observeDiffInformedIncrementalMode() { any() }
3131

32-
Location getASelectedSourceLocation(DataFlow::Node source) {
33-
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 25 (/Users/d10c/src/semmle-code/ql/javascript/ql/src/Security/CWE-078/IndirectCommandInjection.ql@29:8:29:16)
34-
}
35-
3632
Location getASelectedSinkLocation(DataFlow::Node sink) {
37-
exists(DataFlow::Node node |
38-
isSinkWithHighlight(sink, node) and
39-
result = node.getLocation()
33+
exists(DataFlow::Node highlight | result = highlight.getLocation() |
34+
if isSinkWithHighlight(sink, _)
35+
then isSinkWithHighlight(sink, highlight)
36+
else highlight = sink
4037
)
41-
// TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 25 (/Users/d10c/src/semmle-code/ql/javascript/ql/src/Security/CWE-078/IndirectCommandInjection.ql@29:8:29:16)
4238
}
4339
}
4440

0 commit comments

Comments
 (0)