simplifications inspired by review

This commit is contained in:
erik-krogh
2023-01-13 13:18:52 +01:00
parent 43696f5e27
commit 71af8ab022
2 changed files with 2 additions and 7 deletions

View File

@@ -210,12 +210,7 @@ module API {
* This is similar to `asSink()` but additionally includes nodes that transitively reach a sink by data flow.
* See `asSink()` for examples.
*/
DataFlow::Node getAValueReachingSink() {
result = Impl::trackDefNode(this.asSink())
or
// in case `asSink()` is not a `SourceNode`.
result = this.asSink()
}
DataFlow::Node getAValueReachingSink() { result = Impl::trackDefNode(this.asSink()) }
/** DEPRECATED. This predicate has been renamed to `asSink`. */
deprecated DataFlow::Node getARhs() { result = this.asSink() }

View File

@@ -169,7 +169,7 @@ module UnsafeShellCommandConstruction {
or
exists(API::Node node |
node.asSink() = sys.getOptionsArg() and
node.getMember("shell").getAValueReachingSink().mayHaveBooleanValue(true)
node.getMember("shell").asSink().mayHaveBooleanValue(true)
)
}