Find weak message digests used inside custom PasswordEncoder implementations

Proprietary

Finds calls to MessageDigest.getInstance("...") whose algorithm is unsuitable for password storage, scoped to classes implementing org.springframework.security.crypto.password.PasswordEncoder. Unsalted and non-iterated digests (MD2, MD4, MD5, SHA-1, SHA-224/256/384/512) are unsuitable for password hashing regardless of how they are wrapped. Delegate to BCryptPasswordEncoder, Argon2PasswordEncoder, Pbkdf2PasswordEncoder, or SCryptPasswordEncoder instead of implementing PasswordEncoder yourself.

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

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