Weak password encryption algorithm (MD5) used for password detected.
- Rule ID: go_lang_weak_password_encryption_md5
- Languages: go
- Source: weak_password_encryption_md5.yml
Description
A weak hashing library can lead to data breaches and greater security risk.
Remediations
According to OWASP, MD5 and its predecessors are considered weak hash algorithms and therefore shouldn't be used.
❌ Do not use encryption for passwords, wherever possible:
md5.Sum([]byte('password'))
✅ Instead, we recommend using sha256:
sha256.Sum256([]byte('string'))
Associated CWE
OWASP Top 10
Configuration
To skip this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --skip-rule=go_lang_weak_password_encryption_md5
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=go_lang_weak_password_encryption_md5
Ready to take the next step? Learn more about Bearer Cloud.