contrib.dlint.dlint-equivalent.insecure-cryptography-attribute-use

profile photo of returntocorpreturntocorp
Author
221
Download Count*

Weak or insecure 'cryptography' module attribute usage

Run Locally

Run in CI

Defintion

rules:
  - id: insecure-cryptography-attribute-use
    message: Weak or insecure 'cryptography' module attribute usage
    languages:
      - python
    severity: WARNING
    metadata:
      source_rule_url: https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO134.md
      category: security
      technology:
        - python
      references:
        - https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO134.md
      owasp:
        - A02:2021 - Cryptographic Failures
        - A03:2017 - Sensitive Data Exposure
      cwe:
        - "CWE-310: Cryptographic Issues"
      license: Commons Clause License Condition v1.0[LGPL-2.1-only]
    pattern-either:
      - pattern: cryptography.hazmat.primitives.hashes.MD5
      - pattern: cryptography.hazmat.primitives.hashes.SHA1
      - pattern: cryptography.hazmat.primitives.ciphers.modes.ECB
      - pattern: cryptography.hazmat.primitives.ciphers.algorithms.Blowfish
      - pattern: cryptography.hazmat.primitives.ciphers.algorithms.ARC4
      - pattern: cryptography.hazmat.primitives.ciphers.algorithms.IDEA
      - pattern: cryptography.hazmat.primitives.asymmetric.padding.PKCS1v15