Usage of weak encryption algorithm (Blowfish)

Description

Your code is at risk due to the use of Blowfish, a weak encryption algorithm. This vulnerability can lead to data breaches and compromises your security measures.

Remediations

  • Do not use Blowfish 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.
    from Crypto.Cipher import AES

    cipher = AES.new(aes_key, AES.MODE_OCB)
    ciphertext, tag = cipher.encrypt_and_digest(plaintext)

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

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

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