The forbidden names widen to anything containing "vault", SSH keys, .envrc and
.env* files. Names that Windows or macOS extraction would read differently are
rejected (trailing space or dot, reserved device names, "::", 8.3 aliases of
.git, non-ASCII spaces, surrogate/private-use/unassigned characters, components
over 255 bytes), and the .git test compares after NFKC and case folding.
Duplicates are compared case-insensitively, a name that is both a file and a
directory is rejected, and only one slash is stripped. A unit test builds a real
tarball with ansible-galaxy, another asserts the directories build.yml prunes are
in galaxy.yml build_ignore, lint.yml runs tests/scripts, and the Build workflow
fails unless exactly one tarball matches. The docstring states that file
symlinks are invisible to the archive check.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
check_tarball.py now compares path components case-insensitively (.GIT,
Molecule), rejects backslashes and control or zero-width characters,
duplicate members, an empty archive and a missing REQUIRED file, and
reports an unreadable archive as one line. Drop the shebang and the
executable bit and pass check= to subprocess.run so ansible-test sanity
passes.
ansible-galaxy dereferences symlinks, which the archive check cannot see,
so the Build workflow fails when the source tree holds a symlink.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
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
Extend galaxy.yml build_ignore (extensions, role molecule scenarios, CLAUDE.md, tool
directories, tests/scripts) and add scripts/check_tarball.py, an allow-list check run
by the Build workflow after the Collection build and before galaxy-importer.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
dev-setup.sh creates the virtualenv with the pinned tools and installs the git
hooks with the virtualenv first on PATH inside the hook scripts. Without that,
the language: system hooks (REUSE, changelog lint, ansible-lint) fail with
"No such file or directory: 'reuse'" on a plain `git commit`; found while testing
the hooks in a fresh clone.
CLAUDE.md records the rules of the repository for Claude Code: commit with git
so the hooks run (the Gitea API skips them, which let four lint failures reach
CI), feature branches and protected main/tags, the workflow rules, how the
images are versioned and pinned, and the 100 MB layer limit. It is written for
a repository that will be public: no addresses, no host names beyond the
public Gitea.
CONTRIBUTING.md points at the script.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm