[LOW] Pin workflow actions and restrict token permissions - #391
Closed
OskarEichler wants to merge 1 commit into
Closed
[LOW] Pin workflow actions and restrict token permissions#391OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
Owner
|
the permissions is fine ... but I'm not pinning commits to commonly used public actions |
Owner
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.
Summary
Pin both third-party workflow actions to immutable commits and set the workflow token's default permission to read-only repository contents.
Security impact
The current workflow executes mutable
actions/checkout@v6andruby/setup-ruby@v1references on pushes and pull requests while inheriting GitHub's ambient token permissions. If either mutable reference moves unexpectedly or its upstream release channel is compromised, changed code runs with whatever access the repository default grants.This change preserves the human-readable major tags in comments while making the executed revisions immutable:
actions/checkoutv6:d23441a48e516b6c34aea4fa41551a30e30af803ruby/setup-rubyv1:95ef2b042f9d7a56d8268cba8559e2842e2ad01bVerification
uses:entry is commit-pinned.git diff --checkpasses.actionlintwas not available locally; GitHub Actions remains the authoritative workflow execution check.Compatibility
No gem runtime or package behavior changes. Future action updates must deliberately update the pinned SHA.