contrib.dlint.dlint-equivalent.insecure-os-temp-use

Author
1,891
Download Count*
The Python 'os' tempnam|tmpnam functions are vulnerable to symlink attacks
Run Locally
Run in CI
Defintion
rules:
- id: insecure-os-temp-use
message: The Python 'os' tempnam|tmpnam functions are vulnerable to symlink attacks
languages:
- python
severity: WARNING
metadata:
source_rule_url: https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO106.md
category: security
technology:
- python
references:
- https://github.com/dlint-py/dlint/blob/master/docs/linters/DUO106.md
owasp:
- A09:2017 - Using Components with Known Vulnerabilities
- A06:2021 - Vulnerable and Outdated Components
cwe:
- "CWE-377: Insecure Temporary File"
license: Commons Clause License Condition v1.0[LGPL-2.1-only]
pattern-either:
- pattern: os.tempnam(...)
- pattern: os.tmpnam(...)
Short Link: https://sg.run/J9Ed