File System
os.path, tempfile, pathlib — path traversal and temp file handling
PyAiofilesaiofiles provides async file I/O. aiofiles.open() is a path-traversal sink when the path is user-controlled (same as built-in open).
PyConfigparserThe configparser module reads INI-style config files. Values read via get() are sources when the config file is user-supplied. The module itself has no injection sinks of its own.
PyDockerfileParsedockerfile_parse parses Dockerfiles. Returned structures reflect user-controlled file content. Usually a source for linting rules, not a sink.
PyFileinputPython stdlib module — fileinput. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
PyFnmatchPython stdlib module — fnmatch. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
PyGlobThe glob module. glob.glob() resolves shell-style patterns against the filesystem — finding when the pattern is user-controlled (can enumerate directories outside intended scope).
PyLoggingThe logging module. Most uses are neutral. Log-injection findings arise when user-controlled data is logged without sanitization — attackers can break log line boundaries with \n or forge subsequent log entries.
PyMimetypesPython stdlib module — mimetypes. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
PyOSPathThe os.path module for path manipulation. join() concatenates path components but does not resolve traversal sequences — path-traversal bug when joining a trusted base with a user-controlled path. Use os.path.commonpath + realpath containment checks to sanitize.
PyPathlibThe pathlib module is the modern OO path API. Path.resolve() expands symlinks (sanitizer when combined with containment check). Path.open / read_text / write_text are file I/O sinks when the path is user-controlled.
PyReThe re module. Catastrophic backtracking in regex patterns (ReDoS) — finding when a user-controlled pattern flows into re.compile / re.search / re.match. Also, re.findall on untrusted HTML is a common anti-pattern that misses cases.
PyRegexThird-party Python package module — regex. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
PyShutilThe shutil module for high-level file operations. unpack_archive automatically extracts tar / zip / gztar / bztar / xztar archives — same zip-slip risks as tarfile.extractall. copytree can also be used for path-traversal.
PyTempfileThe tempfile module. mktemp() is deprecated and insecure (race condition between filename generation and open). Use NamedTemporaryFile, mkstemp, or TemporaryDirectory which atomically create the file.