Skip to content

ci: pin sigstore/cosign-installer@main to a full commit SHA - #1759

Merged
dimitri merged 2 commits into
dimitri:mainfrom
kobihikri:pin-cosign-installer-sha
Jul 15, 2026
Merged

ci: pin sigstore/cosign-installer@main to a full commit SHA#1759
dimitri merged 2 commits into
dimitri:mainfrom
kobihikri:pin-cosign-installer-sha

Conversation

@kobihikri

Copy link
Copy Markdown
Contributor

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 action sigstore/cosign-installer@main. @main is a mutable branch, and in both files the build job declares permissions: packages: write + id-token: write and logs in to ghcr.io with GITHUB_TOKEN. If that upstream branch were repointed or compromised (the tj-actions/changed-files class 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 — the cosign-release: v2.2.3 input 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.

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).
@dimitri

dimitri commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Thanks for the careful writeup and for verifying every line yourself — the risk framing (OIDC + packages write on a @main-pinned action) is spot-on. Merging.

@dimitri
dimitri merged commit 1c8e2e6 into dimitri:main Jul 15, 2026
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants