Find two-argument Cipher.init(opmode, key) calls

Proprietary

The two-argument Cipher.init(opmode, key) lets the JCE pick an IV — that IV is generated from a provider-default SecureRandom, which is fine, but for CBC/GCM you usually want to control the IV explicitly so it can be transmitted alongside the ciphertext. Pass an IvParameterSpec (or GCMParameterSpec) generated from SecureRandom.

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