mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
simplifications inspired by review
This commit is contained in:
@@ -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() }
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user