Pin GitHub Actions to commit hashes - #3020
Merged
Merged
Conversation
soutaro
approved these changes
Jun 29, 2026
Run pinact to replace mutable references (e.g. actions/checkout@v7, ruby/setup-ruby@v1) with the full commit SHA of the release they currently resolve to, keeping the version as a trailing comment. Pinning to immutable SHAs prevents a compromised or retagged action from silently changing what CI executes. Every action in .github/workflows/ is covered; the resulting versions are: actions/checkout v7.0.1 actions/cache v6.1.0 actions/upload-artifact v7.0.1 ruby/setup-ruby v1.321.0 rubygems/configure-rubygems-credentials v2.1.0 bytecodealliance/actions v1.1.3 dependabot/fetch-metadata was already pinned and is left untouched. The note above rubygems/configure-rubygems-credentials explaining why it alone used an exact release is dropped: every action carries an exact version now, so the contrast it pointed at no longer exists. Dependabot understands the "SHA # version" form and rewrites both parts, so .github/dependabot.yml keeps working as the update path. Note this makes ruby/setup-ruby lag behind its releases, which mostly exist to add newly released Ruby versions to its build matrix; a workflow pinned to an exact ruby-version can fail until Dependabot catches up, and one asking for a series such as "4.0" silently stays on an older patch. Generated with: pinact run (pinact v4.1.1) https://github.com/suzuki-shunsuke/pinact ハッシュ固め夜半の月さえ動かさず
pocke
force-pushed
the
Pin_GitHub_Actions_to_commit_hashes
branch
from
August 10, 2026 05:21
53496a9 to
650f89b
Compare
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.
Run pinact to replace mutable tag references (e.g. actions/checkout@v7) with their corresponding full commit SHAs, keeping the version tag as a trailing comment. Pinning to immutable SHAs prevents a compromised or retagged action from silently changing behavior in CI.
Generated with: pinact run (pinact v4.1.0)