PyPI / platformdirs / 4.13.0
platformdirs 4.13.0
- Source
- https://github.com/tox-dev/platformdirs
- Tag scanned
4.13.0- Compared with
4.12.4(0 signals introduced since)- Files
- 33 scanned, 6 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 5 info
- Scan time
- 4.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-14 18:15
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
likely benign RST how-to showing example console output of a platformdirs call on Windows.
Reasoning
This is a documentation example showing a Windows cmd session that sets an env var and runs python -c to print a path. The 'redirect writes to python' flag is an artifact of the doc's console-transcript formatting; the snippet contains no download, shell pipeline, or actual PATH manipulation. Benign doc content.
-
dismissed Doc example line showing a Windows cache path output, misread as an obfuscated command name.
Reasoning
The flagged 'backslash-escape sequences' are just Windows path separators in a documentation output example (X:\appdata\Acme\...). Not a command obfuscation attempt; it is a rendered transcript line.
-
= =likely benign Test helper that saves and monkeypatches PlatformDirs class attributes for test isolation.Reasoning
This is a testing helper that temporarily patches PlatformDirs attributes via setattr and restores them from a saved dict. Reflective access via vars() is a common mocking pattern in test utilities for a library like platformdirs. Only mildly suspicious as a general pattern; the code is self-contained and legitimate for a testing module.
-
= # ty: ignore[invalid-assignment] dellikely benign Test code temporarily overriding builtins.__import__ to simulate module import behavior.Reasoning
Replacing builtins.__import__ inside a test to simulate import failures or fake modules is a standard test technique. The code restores the original import afterward and clears sys.modules entries. The flag is accurate in describing the global effect, but within a test module this is expected, not malicious.
-
# restore original modules = =likely benign Test cleanup restoring the original builtins.__import__ and sys.modules after a patched import test.Reasoning
This is the restore step paired with the override at line 171, putting back the original builtin import and sys.modules entries. It is cleanup logic for a test-only monkeypatch, consistent with a legitimate test fixture.
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.
&&