PyPI / platformdirs / 4.13.4
platformdirs 4.13.4
- Source
- https://github.com/tox-dev/platformdirs
- Tag scanned
4.13.4- Compared with
4.13.3(0 signals introduced since)- Files
- 33 scanned, 6 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 5 info
- Scan time
- 6.2 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 5 of 5 warn and critical signals; 5 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-17 21:10
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
dismissed RST how-to example showing platformdirs output via a python -c invocation.
Reasoning
This is a documentation example showing a user running python with a Windows environment variable set. The ast pass flagged the command name 'python' as a PATH-hijack setup, but the snippet is an ordinary illustrative command with no redirect, download, or payload. Nothing in the snippet suggests a shadowing attack.
-
dismissed Documentation output line with a Windows cache path; the backslash count is a false positive from path syntax.
Reasoning
The flagged 'command name' is a Windows-style path fragment in a documentation output block, not a real escaped command. The backslashes are ordinary path separators in displayed output, so there is no command hiding.
-
= =likely benign Test utility that saves and overrides PlatformDirs attributes via reflection.Reasoning
testing.py is a test helper that temporarily patches PlatformDirs class attributes, saving originals via vars() and restoring them afterward. Reflective getattr/setattr is the normal way to build such a patching context manager. It has no network, exec, or persistence behaviour.
-
= # ty: ignore[invalid-assignment] dellikely benign Test code that swaps in a fake __import__ to simulate platformdirs import behaviour.Reasoning
Within a test, the code temporarily replaces builtins.__import__ with a fake to simulate import failures, then removes the platformdirs modules from sys.modules. This is a common test technique. Although the override is process-wide, the snippet shows it scoped to the test and paired with restoration, so the critical severity looks overstated.
-
# restore original modules = =likely benign Test cleanup that restores the original builtin import and sys.modules entries.Reasoning
The same test fixture restores the original builtins.__import__ and re-populates sys.modules. The snippet shows the save-and-restore cleanup, which is the expected counterpart of the monkeypatch in a test, with no malicious payload or exfiltration.
Reproduce This Scan
Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
&&