Find java.util.Random() allocations

Proprietary

java.util.Random is a linear-congruential generator — its state is recoverable from a handful of outputs, so it must not produce session IDs, tokens, salts, IVs, or password reset values. Use java.security.SecureRandom for any security-adjacent randomness.

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