Weak hash algorithm (ARCH6111)
Key ruby.security.weak-hash · Severity error · Category security · CWE CWE-328
Using MD5 or SHA-1 for security purposes is vulnerable to collision attacks and is no longer trustworthy for integrity or signature security.
Incorrect
Section titled “Incorrect”def fingerprint(data) Digest::MD5.hexdigest(data)endCorrect
Section titled “Correct”def fingerprint(data) Digest::SHA256.hexdigest(data)endReplace MD5/SHA-1 with SHA-256 or a stronger family.