Skip to content

Commit 71af8ab

Browse files
committed
simplifications inspired by review
1 parent 43696f5 commit 71af8ab

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,7 @@ module API {
210210
* This is similar to `asSink()` but additionally includes nodes that transitively reach a sink by data flow.
211211
* See `asSink()` for examples.
212212
*/
213-
DataFlow::Node getAValueReachingSink() {
214-
result = Impl::trackDefNode(this.asSink())
215-
or
216-
// in case `asSink()` is not a `SourceNode`.
217-
result = this.asSink()
218-
}
213+
DataFlow::Node getAValueReachingSink() { result = Impl::trackDefNode(this.asSink()) }
219214

220215
/** DEPRECATED. This predicate has been renamed to `asSink`. */
221216
deprecated DataFlow::Node getARhs() { result = this.asSink() }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ module UnsafeShellCommandConstruction {
169169
or
170170
exists(API::Node node |
171171
node.asSink() = sys.getOptionsArg() and
172-
node.getMember("shell").getAValueReachingSink().mayHaveBooleanValue(true)
172+
node.getMember("shell").asSink().mayHaveBooleanValue(true)
173173
)
174174
}
175175

0 commit comments

Comments
 (0)