Find File("..." + input) constructions
ProprietaryConcatenating user input into a File(...) path is the canonical path-traversal vector (../etc/passwd). Resolve against a fixed base with File(base, name) plus an explicit canonicalPath.startsWith(baseCanonicalPath) check.
org. openrewrite. kotlin. security. FindFilePathConcat$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. security. FindFilePathConcat$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.