Find Class.forName(...) calls with non-literal arguments
ProprietaryClass.forName(input) lets the caller choose a class to load — the classic gadget chain for deserialization-style attacks and unsafe reflection. Match against a sealed allowlist instead.
org. openrewrite. kotlin. security. FindClassForNameWithNonLiteral$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. security. FindClassForNameWithNonLiteral$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.