Find unsafe reflection vectors

Proprietary

Finds calls to Class.forName() which, when the class name is derived from user input, can allow an attacker to instantiate arbitrary classes. Review these call sites to ensure the class name is not externally controlled.

org.openrewrite.java.security.search.FindUnsafeReflection
mod run . --recipe=org.openrewrite.java.security.search.FindUnsafeReflection

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find method usages java.lang.Class forName(String, ..)