Skip to content

Commit 15bd724

Browse files
committed
JS: ShellCommandInjection
1 parent d67491a commit 15bd724

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,12 @@ module ShellCommandInjectionFromEnvironmentConfig implements DataFlow::ConfigSig
3030

3131
predicate observeDiffInformedIncrementalMode() { any() }
3232

33-
Location getASelectedSourceLocation(DataFlow::Node source) {
34-
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 26 (/Users/d10c/src/semmle-code/ql/javascript/ql/src/Security/CWE-078/ShellCommandInjectionFromEnvironment.ql@30:8:30:16)
35-
}
36-
3733
Location getASelectedSinkLocation(DataFlow::Node sink) {
38-
exists(DataFlow::Node node |
39-
isSinkWithHighlight(sink, node) and
40-
result = node.getLocation()
34+
exists(DataFlow::Node highlight | result = highlight.getLocation() |
35+
if isSinkWithHighlight(sink, _)
36+
then isSinkWithHighlight(sink, highlight)
37+
else highlight = sink
4138
)
42-
// 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 26 (/Users/d10c/src/semmle-code/ql/javascript/ql/src/Security/CWE-078/ShellCommandInjectionFromEnvironment.ql@30:8:30:16)
4339
}
4440
}
4541

0 commit comments

Comments
 (0)