Find non-cryptographic random sources (Math.random, kotlin.random.Random, java.util.Random)

Proprietary

Non-cryptographic randomness is fine for jitter, simulation, sampling — but each call is a position to verify that no security-relevant value (session token, password reset link, nonce) flows from it. Use SecureRandom instead in those positions.

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