ci: pin sigstore/cosign-installer@main to a full commit SHA - #1759
Merged
Conversation
docker-publish.yml and docker-publish-v4.yml referenced this third-party action by the mutable @main branch inside the build job that holds packages: write + id-token: write and logs in to ghcr.io with GITHUB_TOKEN. Pinning to a full commit SHA (v4.1.2) removes the mutable-ref supply-chain exposure. The installed cosign version is unchanged (cosign-release input stays v2.2.3).
Owner
|
Thanks for the careful writeup and for verifying every line yourself — the risk framing (OIDC + packages write on a |
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.
Hi, and thank you for pgloader.
Small supply-chain hardening. Both
.github/workflows/docker-publish.yml(line 42) and.github/workflows/docker-publish-v4.yml(line 30) use the third-party actionsigstore/cosign-installer@main.@mainis a mutable branch, and in both files thebuildjob declarespermissions: packages: write+id-token: writeand logs in to ghcr.io withGITHUB_TOKEN. If that upstream branch were repointed or compromised (thetj-actions/changed-filesclass of risk), it would run with the job's write-scoped token and OIDC identity on push/tag builds.This PR pins the action to a full commit SHA (
v4.1.2). The installed cosign version is unchanged — thecosign-release: v2.2.3input is untouched — so this only removes the mutable reference. The other actions in these jobs are already version-pinned.For transparency: I used AI assistance to help identify this and draft the change; I verified every line against the live workflows myself.