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 {
366
366
src .asExpr ( ) .( MethodCall ) .getMethod ( ) .getName ( ) = "source"
367
367
}
368
368
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
+ }
370
376
}
371
377
372
- /** Tracks taint flow to any argument. */
378
+ /** Tracks taint flow to the parent argument of a `File` constructor . */
373
379
private module TaintedArgFlow = TaintTracking:: Global< TaintedArgConfig > ;
374
380
375
381
/** Holds if `g` is a guard that checks for `..` components. */
You can’t perform that action at this time.
0 commit comments