Usage of weak encryption algorithm (RSA)
- Rule ID: ruby_lang_weak_encryption_rsa
- Languages: ruby
- Source: weak_encryption_rsa.yml
Description
Using a weak encryption algorithm, specifically 1024-bit RSA, compromises data security. This vulnerability can lead to unauthorized access to sensitive information.
Remediations
- Do not use 1024-bit RSA for encryption. It is no longer considered secure.
OpenSSL::PKey::RSA.new(1024) # unsafe
- Do use stronger encryption methods, such as bcrypt, to enhance security.
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_rsa
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=ruby_lang_weak_encryption_rsa