Skip to content

ci: pin github actions to commit shas - #9

Merged
bill-yen-opus merged 4 commits into
mainfrom
billyen-sec-254
Aug 12, 2026
Merged

ci: pin github actions to commit shas#9
bill-yen-opus merged 4 commits into
mainfrom
billyen-sec-254

Conversation

@bill-yen-opus

Copy link
Copy Markdown
Contributor

Pins every GitHub Actions uses: reference to an immutable 40-char commit SHA (keeping # vX.Y.Z comments so Renovate/Dependabot can still propose updates), pins internal opus-pro/* refs that pointed at mutable branches, and adds a shell-only actions-pinned-check workflow that fails any PR reintroducing an unpinned ref.

Why: mutable tags don't pin — an attacker with a maintainer token repoints the tag at a malicious commit (CVE-2025-30066, 23,000+ repos hit via tj-actions). We had 100+ builds referencing trivy-action@master inside that action's ~12-hour compromise window.

The check job is deliberately plain shell with permissions: {} — the gate itself must not add another supply-chain dependency.

Part of SEC-254.

🤖 Generated with Claude Code

bill-yen-opus and others added 4 commits August 12, 2026 18:08
Part of SEC-254.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The gate ran with permissions: {}, so actions/checkout could not fetch the private repo and the job failed before the scan. Part of SEC-254.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use the shared self-hosted standard runner instead of ubuntu-latest. Part of SEC-254.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
yamllint's document-start rule requires a leading ---. Part of SEC-254.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bill-yen-opus
bill-yen-opus enabled auto-merge (squash) August 12, 2026 16:19
@bill-yen-opus
bill-yen-opus merged commit 572311f into main Aug 12, 2026
2 of 3 checks passed
@bill-yen-opus
bill-yen-opus deleted the billyen-sec-254 branch August 12, 2026 23:22
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