Skip to content

chore(ci): pin all GitHub Actions to full-length commit SHAs#422

Merged
54m merged 1 commit into
masterfrom
worktree-agent-a1096635
May 2, 2026
Merged

chore(ci): pin all GitHub Actions to full-length commit SHAs#422
54m merged 1 commit into
masterfrom
worktree-agent-a1096635

Conversation

@54m
Copy link
Copy Markdown
Member

@54m 54m commented May 2, 2026

Summary

Pin every GitHub Actions reference in .github/workflows/ to a full 40-character commit SHA, following GitHub's hardening guide. This protects against supply-chain attacks where a Git tag could be silently re-pointed to a malicious commit.

Why

Third-party actions (and even first-party ones) are pinned by tag (@v4) by default, but Git tags are mutable. A compromised maintainer or a successful credential-theft can repoint a tag to malicious code, and every CI run pulling @v4 would silently execute it. Pinning to a commit SHA makes this impossible — the SHA is content-addressed.

Changes

Action Tag Pinned SHA
actions/checkout v4.3.1 34e114876b0b11c390a56381ad16ebd13914f8d5
actions/setup-go v5.6.0 40f1582b2485089dde7abd97c1529aa768e1baff
actions/cache v4.3.0 0057852bfaa89a56745cba8c7296529d2fc39830
actions/setup-node v4.4.0 49933ea5288caeca8642d1e84afbd3f7d6820020
dart-lang/setup-dart v1.7.2 65eb853c7ba17dde3be364c3d2858773e7144260
nanasess/setup-chromedriver v2.2.2 42cc2998329f041de87dc3cfa33a930eacd57eaa
golangci/golangci-lint-action v7.0.1 9fae48acfc02a90574d7c304a1758ef9895495fa
goreleaser/goreleaser-action v5.0.0 7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8

Files touched:

  • .github/workflows/go.yml
  • .github/workflows/linter.yml
  • .github/workflows/release.yml

Test plan

  • grep -E "@[0-9a-f]{40}" .github/workflows/*.yml shows every uses: line pinned to a full SHA
  • SHA pin 漏れゼロを確認(grep -v "@[0-9a-f]{40}" で 0 件)
  • CI passes (test / linter / e2e)

Following GitHub's hardening guide, pin every third-party (and
first-party) action used in workflows to a full 40-char commit SHA,
with a version comment for human readability. This protects against
supply-chain attacks where a tag could be silently re-pointed to a
malicious commit.

Pinned actions:
- actions/checkout (v4.3.1)
- actions/setup-go (v5.6.0)
- actions/cache (v4.3.0)
- actions/setup-node (v4.4.0)
- dart-lang/setup-dart (v1.7.2)
- nanasess/setup-chromedriver (v2.2.2)
- golangci/golangci-lint-action (v7.0.1)
- goreleaser/goreleaser-action (v5.0.0)

対象ファイル:
- .github/workflows/go.yml
- .github/workflows/linter.yml
- .github/workflows/release.yml
@54m 54m merged commit 8b1497a into master May 2, 2026
3 checks passed
@54m 54m deleted the worktree-agent-a1096635 branch May 2, 2026 16:24
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