PyPI / platformdirs / 4.13.5
platformdirs 4.13.5
- Source
- https://github.com/tox-dev/platformdirs
- Tag scanned
4.13.5- Compared with
4.13.4(0 signals introduced since)- Files
- 33 scanned, 6 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 5 info
- Scan time
- 6.5 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-20 00:10
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
dismissed Documentation example of running python -c with platformdirs in a Windows shell.
Reasoning
This is a Windows console example in reStructuredText documentation showing a user running python -c with an environment variable set. The 'redirect' is a doc-parsing artifact of the '>' prompt markers, not a PATH hijack. No executable payload is present.
-
dismissed Windows path output in a documentation example, misread as an obfuscated command name.
Reasoning
The flagged 'backslash escapes' are Windows path separators in the example output (X:\appdata\Acme\MyApp\Cache) and the command itself is a plain, readable python invocation. The finding is a false positive from treating doc text as a shell command.
-
= =likely benign Test helper that temporarily patches PlatformDirs attributes via setattr after saving originals.Reasoning
This is a test helper in the platformdirs package that saves original class attributes via vars(), applies patches with setattr, and presumably restores them afterward. Dynamic attribute access of this kind is a standard mocking technique in test utilities and does not hide anything malicious.
-
= # ty: ignore[invalid-assignment] dellikely benign Test fixture that temporarily overrides builtins.__import__ to simulate import failures.Reasoning
The test temporarily replaces builtins.__import__ with a fake importer to simulate platformdirs modules being unavailable, and clears them from sys.modules. This is a deliberate test isolation technique; the flagged code sits inside a setup/teardown pattern that restores the original import function.
-
# restore original modules = =likely benign Restoration of builtins.__import__ and sys.modules after the import-simulation test.Reasoning
This restores the original builtins.__import__ and reinstates sys.modules entries, which is the cleanup counterpart of the patch at line 171. The pair forms a balanced, scoped test pattern rather than persistent global tampering.
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.
&&