Usage of weak encryption algorithm (DES)
- Rule ID: javascript_lang_weak_encryption_des
- Languages: javascript
- Source: weak_encryption_des.yml
Description
Your code is at risk due to the use of DES (Data Encryption Standard), a weak encryption algorithm. This vulnerability can lead to data breaches and compromises your security measures.
Remediations
- Do not use DES as it is outdated and vulnerable to attacks. Its use can significantly weaken your application's security.
- Do opt for stronger encryption algorithms, such as AES (Advanced Encryption Standard), to ensure the confidentiality and integrity of your data.
const crypto = require("crypto");
const cipher = crypto.createCipheriv("aes-256-cbc", key, iv);
const encrypted = cipher.update("my secret message", "utf8");
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=javascript_lang_weak_encryption_des
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=javascript_lang_weak_encryption_des