File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -366,10 +366,16 @@ private module TaintedArgConfig implements DataFlow::ConfigSig {
366366 src .asExpr ( ) .( MethodCall ) .getMethod ( ) .getName ( ) = "source"
367367 }
368368
369- predicate isSink ( DataFlow:: Node sink ) { exists ( Call call | sink .asExpr ( ) = call .getAnArgument ( ) ) }
369+ predicate isSink ( DataFlow:: Node sink ) {
370+ sink .asExpr ( ) =
371+ any ( ConstructorCall constrCall |
372+ constrCall .getConstructedType ( ) instanceof TypeFile and
373+ constrCall .getNumArgument ( ) = 2
374+ ) .getArgument ( 0 )
375+ }
370376}
371377
372- /** Tracks taint flow to any argument. */
378+ /** Tracks taint flow to the parent argument of a `File` constructor . */
373379private module TaintedArgFlow = TaintTracking:: Global< TaintedArgConfig > ;
374380
375381/** Holds if `g` is a guard that checks for `..` components. */
You can’t perform that action at this time.
0 commit comments