All rules →
Rules / Python
SHIELD-PY-009

Path traversal via open()

highPythonCWE-22CVSS 7.5

What it detects

Opening files with user-controlled paths allows directory traversal.

How to fix

Validate file paths using os.path.realpath() and check against an allowed base directory.

Scan your repo freeFull documentation
Back to all rules
SHIELD-PY-009: Path traversal via open() — Zennoxa Shield