CodeQL library for Java/Kotlin
codeql/java-all 0.9.2-dev (changelog, source)
Search

Predicate isFileConstructorArgument

Holds if expDest is some constructor call new java.io.File(expSource), where the specific File constructor being used has paramCount parameters.

Import path

import semmle.code.java.security.TempDirUtils
predicate isFileConstructorArgument(Expr expSource, Expr exprDest, int paramCount)