ci: pin GitHub Actions to commit SHAs (supply-chain hardening)#1702
Open
Fabridev444 wants to merge 1 commit into
Open
ci: pin GitHub Actions to commit SHAs (supply-chain hardening)#1702Fabridev444 wants to merge 1 commit into
Fabridev444 wants to merge 1 commit into
Conversation
Pins all 4 unpinned action refs in debian-ci.yml and docker-publish.yml to immutable commit SHAs. Original tag preserved as trailing comment so Dependabot keeps auto-bumping. Notable: sigstore/cosign-installer@main was a branch ref. Anyone with push to sigstore/cosign-installer could rewrite main and tamper with the docker image-signing pipeline. Now pinned. Generated with https://github.com/Fabridev444/gha-shield: npx Fabridev444/gha-shield .github/workflows --fix
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
Pins all 4 unpinned action references across
debian-ci.ymlanddocker-publish.ymlto immutable commit SHAs, preserving the original tag as a trailing# v2comment so Dependabot keeps auto-bumping the SHA on new releases.Why this matters for pgloader specifically
docker-publish.ymlis the most exposed surface here. It runs on pushes/releases and usessigstore/cosign-installer@main— a branch ref, not a tag. Anyone with push access tosigstore/cosign-installercan rewritemainand tamper with the cosign binary that signs the publisheddimitri/pgloaderdocker images. If that happens, every downstream consumer that pulls a freshly built image after the rewrite gets a signature created by an attacker-controlled cosign — pulled bydocker pull dimitri/pgloader:latestminutes later by every CI pipeline using pgloader for migrations.Pinning to a commit SHA closes that path: SHAs cannot be rewritten without a force-push that breaks every downstream pin simultaneously, which CI surfaces immediately.
For background: tj-actions/changed-files CVE-2025-30066 was exactly this attack class on a tag-pinned action.
This is the GitHub Actions security guide and OpenSSF Scorecard
Pinned-Dependenciesbaseline recommendation.How
Generated mechanically with
gha-shieldv1.0.6:Compatibility
# v2trailing comments and auto-bumps SHAs.Other PRs in the same series
gha-shieldis MIT and self-hosted vianpx Fabridev444/gha-shield. Tip jar (Solana / USDC SPL, scannable QR + Solana Pay link): https://fabridev444.github.io/gha-shield/ · wallet634UtV9dWq8G7ciosqx1pcKkBK4kNkNod9yvoM8ujSdM.