fix(build): reject links, special files and unsafe paths in the Collection archive
check_tarball.py now iterates the tar members instead of their names. Only regular files and directories are allowed, so a symlink or hardlink cannot smuggle a file in under an allowed directory. Absolute paths and paths with an empty, '.', '..' or '.git' component are rejected, so roles/../.venv/x no longer passes the top-level allow list. Tests build crafted tarballs and run the script on them. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
1 parent
e3acab9ca2
commit
580df0b892
3 files changed
+118
-15
No files matched your search
@@ -2,4 +2,6 @@ minor_changes:
|
||||
- >-
|
||||
The Collection archive no longer contains extensions/ (the image-smoke molecule scenario),
|
||||
the roles' molecule scenarios, CLAUDE.md or other repository tooling; the Build workflow
|
||||
now fails when the archive holds anything outside an allow list.
|
||||
now fails when the archive holds anything outside an allow list, a member that is not a
|
||||
regular file or directory (symlinks, hardlinks, devices), or a path that is absolute or
|
||||
holds an empty, '..' or '.git' component.
|
||||
Reference in new issue
Block a user