Find custom MessageDigest implementations

Proprietary

Finds classes, including anonymous ones, that extend java.security.MessageDigest to implement a hash algorithm of their own (CWE-327). A home-made algorithm has had none of the public scrutiny a standard one has, and is likely to be weaker than it looks. Use a standard algorithm such as SHA-256 or SHA-3 from a security provider instead. Test sources are not searched.

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

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