ci: pin third-party GitHub Actions to commit SHAs#658
Merged
Conversation
Mutable tags like @v2 can be repointed if the action's repo is compromised; jobs handling the GPG signing key or running with contents:write would then execute attacker-controlled code. Pinning to full commit SHAs removes that vector. Version comments are kept next to each SHA and Dependabot (github-actions ecosystem) will keep the pins updated. First-party actions/* remain tag-pinned. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #658 +/- ##
============================================
+ Coverage 98.25% 98.41% +0.16%
- Complexity 700 805 +105
============================================
Files 87 94 +7
Lines 2000 2336 +336
============================================
+ Hits 1965 2299 +334
- Misses 35 37 +2 🚀 New features to boost your workflow:
|
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.
Pins all third-party (non-
actions/*) GitHub Actions to full commit SHAs instead of mutable version tags, keeping the version as a comment next to each pin.Tags like
@v2can be repointed at any time: if one of these actions' repos were compromised, the workflows would silently execute attacker-controlled code. This matters most forpublish_phar(which handles the GPG release-signing key and passphrase viacrazy-max/ghaction-import-gpgandsoftprops/action-gh-release) andupdate-contributors.yml(which runs on a schedule withcontents: write).Pinned:
shivammathur/setup-php(2.37.2),codecov/codecov-action(v7.0.0),crazy-max/ghaction-import-gpg(v7.0.0),softprops/action-gh-release(v3.0.2),minicli/action-contributors(v3),test-room-7/action-update-file(v2.1.0).Dependabot already watches the
github-actionsecosystem, so the SHA pins (and their version comments) will keep being updated by its weekly PRs. First-partyactions/*remain tag-pinned.🤖 Generated with Claude Code