Usage of weak encryption algorithm (DES)

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 use stronger encryption algorithms to enhance data security. AES (Advanced Encryption Standard) is a recommended choice.
    Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding");

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

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

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