gitlab.bandit.B304-9

385
Download Count*
License

Detected XOR cipher algorithm which is considered insecure. This algorithm is not cryptographically secure and can be reversed easily. Use AES instead.

Run Locally

Run in CI

Defintion

rules:
  - id: bandit.B304-9
    patterns:
      - pattern-either:
          - pattern: Cryptodome.Cipher.XOR.new(...)
          - pattern: Crypto.Cipher.XOR.new(...)
    message: >
      Detected XOR cipher algorithm which is considered insecure. This algorithm

      is not cryptographically secure and can be reversed easily. Use AES instead.
    metadata:
      cwe: "CWE-327: Use of a Broken or Risky Cryptographic Algorithm"
      owasp: "A3: Sensitive Data Exposure"
      primary_identifier: bandit.B304-9
      secondary_identifiers:
        - name: Bandit Test ID B304
          type: bandit_test_id
          value: B304
      license: MIT
    severity: WARNING
    languages:
      - python