Repository navigation
chore(ci): pin GitHub Actions to full X.Y.Z version comments - #2038
Merged
Merged
Conversation
Dependabot updates the patch version of already-SHA-pinned actions but leaves the comment at the major version (e.g. `# v6`), making it impossible to audit the actual pinned version from the workflow file. Resolve each SHA to its exact release tag via the GitHub API and replace the short `# vN` comment with the full `# vX.Y.Z`. No behavior change — comments only. Closes oras-project#2024 Signed-off-by: Ali <[email protected]>
alliasgher
requested review from
TerryHowe,
Wwwsylvia,
sabre1041,
sajayantony and
shizhMSFT
as code owners
April 23, 2026 19:01
Contributor
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions inline version comments in workflow files so SHA-pinned actions are annotated with the full resolved vX.Y.Z tag (instead of # vN), improving auditability without changing behavior.
Changes:
- Replace
# vNcomments with# vX.Y.Zfor SHA-pinned actions across workflows. - Keep already-fully-qualified version comments unchanged.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/vulnerability-check.yml | Updates actions/checkout and actions/setup-go comments to full patch versions. |
| .github/workflows/stale.yml | Updates actions/stale comment to full patch version. |
| .github/workflows/release-snap.yml | Updates actions/checkout, snapcore/action-build, and snapcore/action-publish comments to full patch versions. |
| .github/workflows/release-github.yml | Updates actions/checkout, actions/setup-go, and goreleaser/goreleaser-action comments to full patch versions. |
| .github/workflows/release-ghcr.yml | Updates actions/checkout and docker/login-action comments to full patch versions. |
| .github/workflows/license-checker.yml | Updates actions/checkout comment to full patch version. |
| .github/workflows/golangci-lint.yml | Updates actions/checkout, actions/setup-go, and golangci/golangci-lint-action comments to full patch versions. |
| .github/workflows/codeql-analysis.yml | Updates actions/checkout, actions/setup-go, and github/codeql-action comments to full patch versions. |
| .github/workflows/build.yml | Updates actions/checkout, actions/setup-go, and codecov/codecov-action comments to full patch versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2038 +/- ##
==========================================
+ Coverage 87.15% 87.22% +0.07%
==========================================
Files 138 138
Lines 5448 5448
==========================================
+ Hits 4748 4752 +4
+ Misses 419 415 -4
Partials 281 281 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Thanks! |
TerryHowe
pushed a commit
to TerryHowe/oras
that referenced
this pull request
Jun 28, 2026
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.
What this PR does / why we need it:
Dependabot bumps the patch version of SHA-pinned actions but leaves the inline comment at the major version (
# v6), so maintainers can't audit the actual pinned release without looking up the SHA by hand. Per the example in the linked issue,actions/checkout@de0fac2e…is currently commented# v6but is actuallyv6.0.2.This PR resolves every SHA currently used in
.github/workflows/**against the GitHub API and replaces the short# vNcomment with the full# vX.Y.Z. All action-version comments that were already at full X.Y.Z (e.g.# v0.8.0,# v0.24.0) are left untouched.Resolved versions:
actions/checkout@de0fac2e…→v6.0.2actions/setup-go@4a360112…→v6.4.0github/codeql-action@95e58e9a…→v4.35.2docker/login-action@4907a6dd…→v4.1.0actions/stale@b5d41d4e…→v10.2.0snapcore/action-build@3bdaa03e…→v1.3.0snapcore/action-publish@214b86e5…→v1.2.0golangci/golangci-lint-action@1e7e51e7…→v9.2.0codecov/codecov-action@57e3a136…→v6.0.0goreleaser/goreleaser-action@e24998b8…→v7.1.0Comments-only change; no behavior impact.
Which issue(s) this PR fixes:
Fixes #2024
Please check the following list: