Skip to content

ci: pin GitHub Actions to full commit SHAs - #123

Open
razorsec wants to merge 2 commits into
calesthio:masterfrom
razorsec:fix/pin-action-shas
Open

ci: pin GitHub Actions to full commit SHAs#123
razorsec wants to merge 2 commits into
calesthio:masterfrom
razorsec:fix/pin-action-shas

Conversation

@razorsec

@razorsec razorsec commented Jun 5, 2026

Copy link
Copy Markdown

What

Pins all third-party GitHub Actions in docker-publish.yml to their full commit SHA instead of floating version tags.

Why

Floating tags (@v3, @v4, @v6) are a supply chain risk — if any upstream action repo is compromised, a malicious release can silently run in this workflow with packages: write access to GHCR. The June 2026 claude-code-action CVE used this exact vector.

Pinning to SHAs means only an explicit update to this file can change what code runs. Version tags are kept as inline comments for readability.

Actions pinned

Action Tag SHA
actions/checkout v4 34e114876b0b11c390a56381ad16ebd13914f8d5
docker/setup-qemu-action v3 c7c53464625b32c7a7e944ae62b3e17d2b600130
docker/setup-buildx-action v3 8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
docker/login-action v3 c94ce9fb468520275223c153574b00df6fe4bcc9
docker/metadata-action v5 c299e40c65443455700f0fdfc63efafe5b349051
docker/build-push-action v6 10e90e3645eae34f1e60eeb005ba3a3d33f178e8

razorsec added 2 commits April 7, 2026 23:26
Floating tags like @v3/@v4/@v6 are a supply chain attack surface —
a compromised upstream release can run arbitrary code in this workflow.
Pin every action to its current full SHA; the version tag is kept as
a comment so the intent stays readable.

Actions pinned:
- actions/checkout v4
- docker/setup-qemu-action v3
- docker/setup-buildx-action v3
- docker/login-action v3
- docker/metadata-action v5
- docker/build-push-action v6
@razorsec
razorsec requested a review from calesthio as a code owner June 5, 2026 13:03
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.

1 participant