Pin GitHub Actions to commit SHAs in release workflow #10021
Merged
+119
−42
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.
The release workflow used tag-based action references (
@v5,@v6) vulnerable to supply chain attacks via tag hijacking or compromised maintainer accounts.Changes
Pinned all 10 actions (14 instances) to immutable commit SHAs with version comments:
Before:
After:
Actions Pinned
actions/checkout@v5→ v5.0.0 (3×)cli/gh-extension-precompile@v2→ v2.1.0actions/setup-go@v6→ v6.0.0anchore/sbom-action@v0.20.10(3×)actions/upload-artifact@v6→ v6.0.0docker/setup-buildx-action@v3→ v3.12.0docker/login-action@v3→ v3.6.0docker/metadata-action@v6→ v5.10.0 (v6 doesn't exist)docker/build-push-action@v6actions/attest-build-provenance@v2→ v2.4.0Verification
Zizmor security scan confirms no unpinned-uses warnings remain.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.