T09 · Insecure Skill Coding Practices
- Location
scripts/build_sprite_package.py:43- Finding
Configuration-Controlled Path Traversal Enables Arbitrary File Writes
- Content
View full analysis
- Remediation
View remediation
Path: root = root.resolve() if relative.is_absolute(): raise ValueError("absolute output paths are not allowed") candidate = (root / relative).resolve() if not candidate.is_relative_to(root): raise ValueError("output path escapes the package directory") return candidate ``` 4. Apply containment validation to atlas, frame, strip, and preview destinations. 5. Reject symlinks in writable package path components where packages may be processed in attacker-controlled directories. 6. Add tests covering absolute paths, nested traversal, mixed separators, and symlink escapes. ]]>
