Make java/path-injection recognise create-file MaD sinks

This commit is contained in:
Chris Smowton
2022-08-02 21:28:00 +01:00
committed by GitHub
parent 0be625f396
commit c95f17fdf2

View File

@@ -34,7 +34,12 @@ class TaintedPathConfig extends TaintTracking::Configuration {
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
override predicate isSink(DataFlow::Node sink) {
exists(Expr e | e = sink.asExpr() | e = any(PathCreation p).getAnInput() and not guarded(e))
(
sink.asExpr() = any(PathCreation p).getAnInput()
or
sinkNode(sink, "create-file")
) and
not guarded(sink.asExpr())
}
override predicate isSanitizer(DataFlow::Node node) {