Find InitialContext.lookup(input) calls with non-literal arguments
ProprietaryDynamic JNDI lookups are the Log4Shell (CVE-2021-44228) pattern — a controlled URL can fetch a remote class file and execute it. Pin lookup names to a literal allowlist; disable remote codebase loading.
org. openrewrite. kotlin. security. FindJndiLookupWithNonLiteral$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. security. FindJndiLookupWithNonLiteral$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.