contrib.dlint.dlint-equivalent.insecure-exec-use

profile photo of returntocorpreturntocorp
Author
221
Download Count*

The Python 'exec' function is not secure against maliciously constructed input

Run Locally

Run in CI

Defintion

rules:
  - id: insecure-exec-use
    message: The Python 'exec' function is not secure against maliciously
      constructed input
    languages:
      - python
    severity: WARNING
    metadata:
      source_rule_url: https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO105.md
      category: security
      technology:
        - python
      references:
        - https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO105.md
      owasp:
        - A01:2017 - Injection
        - A03:2021 - Injection
      cwe:
        - "CWE-78: Improper Neutralization of Special Elements used in an OS
          Command ('OS Command Injection')"
      license: Commons Clause License Condition v1.0[LGPL-2.1-only]
    patterns:
      - pattern: exec(...)
      - pattern-not: exec("...")