Python: Modernise security/injection/Path.qll

And we're making things a bit more clean since it's not *any* argument of `open()` that is a taint-sink.
This commit is contained in:
Rasmus Wriedt Larsen
2020-04-24 12:03:16 +02:00
parent 67837887c8
commit 367ee3e8c4

View File

@@ -64,8 +64,12 @@ class OpenNode extends TaintSink {
OpenNode() {
exists(CallNode call |
call.getFunction().refersTo(Object::builtin("open")) and
call.getAnArg() = this
call = Value::named("open").getACall() and
(
call.getArg(0) = this
or
call.getArgByName("file") = this
)
)
}