Find Runtime.getRuntime().exec(...) calls with non-literal arguments

Proprietary

Runtime.exec(...) passes its argument to the shell on some platforms — concatenating any user input invites command injection. Use ProcessBuilder(arrayOf("prog", arg)) so each argument is passed as a discrete argv slot.

org.openrewrite.kotlin.security.FindRuntimeExecWithNonLiteral$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.security.FindRuntimeExecWithNonLiteral$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.