T09 · Insecure Skill Coding Practices
- Location
scripts/materials.py- Finding
Unvalidated cached artifact names permit path traversal and unauthorized file replacement
- Content
View full analysis
Impact
For example, an artifact name of ../settings.json reads /settings.json. Because the temporary directory is immediately beneath work_dir, staging writes the supplied JSON to work_dir/settings.json; the final replace moves it to work_dir/../settings.json, overwriting an existing writable file there. The same missing allowlist also permits restoring files other than the documented analysis artifacts. File corruption or unauthorized configuration replacement is possible within the process's filesystem permissions.
