Pin GitHub Actions to commit SHAs - #1050
Merged
Merged
Conversation
Tags like v7 are movable pointers: whoever controls the action can re-point them and the next run executes unreviewed code with the job token. Pinning to the commit SHA freezes what runs. Versions stay as comments, so Dependabot keeps bumping them like it already does.
AlfonsoUceda
approved these changes
Jul 23, 2026
AlfonsoUceda
left a comment
Contributor
There was a problem hiding this comment.
Thanks @Totara-thib! fine to me :)
5 tasks
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.
Hi, small drive-by contribution: this pins the two actions in
ruby.ymlto their commit shas, with the versions kept as comments.A tag like
@v7or@v1.319.0is a movable pointer: whoever controls the action, or anyone who compromises it, can re-point it and your next run executes their code with the job's token. Same pattern as the tj-actions/changed-files incident (CVE-2025-30066). With the sha, what runs is frozen to what you reviewed.Dependabot keeps working exactly as today: it understands sha pins with a version comment and will keep opening its weekly bump PRs, same as #1049 did.
Both shas were resolved from the upstream repos and cross checked against their tags: checkout
3d3c42eis v7.0.1, setup-ruby003a5c4is v1.319.0. No logic changes, only the fouruses:lines.Found with the Plumber CLI (https://github.com/getplumber/plumber), verified on master. I can also open a PR which adds it to CI so this does not quietly drift back, that one is a bonus, this PR stands on its own.
Before submitting the PR make sure the following are checked:
[Fix #issue-number](if the related issue exists).master(if not - rebase it).