ci: verify splitsh-lite checksum before running it - #8441
Open
alexisLefebvre wants to merge 1 commit into
Open
Conversation
The release asset was fetched and executed unverified in the job that holds the GitHub App private key. Release assets are mutable, so pinning the URL alone did not pin the bytes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Subtree Split job downloads the
splitsh-literelease tarball, unpacks it and executes it. This adds asha256sum --checkbetween the download andtar, so a tarball whose bytes changed aborts the job instead of running.curlalso gains-f: without it an HTTP error page is written to the file and curl still exits 0, leavingtarto consume the error body.The version and the digest live in
env:so they stay visibly paired, and the checksum line uses the exact two-space formatsha256sumemits, so it can be regenerated and pasted verbatim.Why
Release assets on GitHub are mutable: the URL pins a name, not a payload, and anyone with push access to
splitsh/litecan replace the file behind an unchangedv1.0.1link. That download happens in the one job that holdsAPI_PLATFORM_APP_PRIVATE_KEY, whose App can write to all twenty-one component repositories and dispatch releases inapi-platform/api-platformandapi-platform/demo. Arbitrary code there reaches every published Composer package, so it is the highest-value step in the repository to leave unverified. This is the same class of hole that pinning actions to commit SHAs closes, applied to a payload no action pin covers.splitsh/litepublishes no checksums, so the digest was computed from the asset as currently served. That is trust-on-first-use: it prevents future substitution but cannot prove the current bytes are the 2017 originals. The release API corroborates them — the asset'supdated_atis two seconds after itscreated_atin February 2017 and has not moved since, and GitHub bumps that field when an asset is replaced, across 203k downloads.A stronger root of trust would mean building
splitsh-litefrom a pinned source commit or vendoring the binary; both are larger changes than this one.🤖 Generated with Claude Code