Find inadequate cryptographic key sizes

Proprietary

Finds cryptographic key generation with inadequate key sizes. RSA and DSA keys should be at least 2048 bits, EC keys at least 224 bits, and symmetric keys (AES) at least 128 bits. Weak named EC curves (e.g. secp112r1, prime192v1) are also flagged. When the algorithm of a KeyPairGenerator cannot be resolved, EC curve sizes are judged against the EC minimum and other sizes against the RSA minimum. NIST SP 800-131A Rev 2 requires RSA/DSA 2048+, EC 224+, AES 128+.

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

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