Find non-constant-time comparison of cryptographic digests
ProprietaryDetects when the output of MessageDigest.digest(..) or Mac.doFinal(..) flows into Arrays.equals(byte[], byte[]), a non-constant-time comparison that is vulnerable to timing attacks (CWE-208). Use MessageDigest.isEqual(byte[], byte[]) for security-sensitive byte-array comparisons.
org. openrewrite. analysis. java. security. FindInsecureCryptoComparisonmod run . --recipe= org. openrewrite. analysis. java. security. FindInsecureCryptoComparisonInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.