Usage of weak encryption algorithm (RC4)

Description

Using the RC4 encryption algorithm exposes your data to security risks. RC4 is outdated and has known vulnerabilities that can lead to data breaches.

Remediations

  • Do not use RC4 for encrypting data. Its vulnerabilities make it an insecure option for protecting sensitive information.
    RC4.new("weak password encryption") # unsafe
  • Do use stronger, more secure encryption algorithms like bcrypt for handling sensitive data securely.
    BCrypt::Password.create('iLOVEdogs123')

References

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=ruby_lang_weak_encryption_rc4

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=ruby_lang_weak_encryption_rc4