chore(ci): pin github actions to exact version tags#249
Merged
Conversation
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
Pin all external GitHub Actions in the workflow files to exact version tags (
@vX.Y.Z) instead of moving references (major-only@vX, or branch refs like@master).Why
Moving refs silently absorb upstream changes on every run, which makes CI non-reproducible and exposes the pipeline to major drift and unexpected behavior changes. Pinning to a full semver tag freezes the action to a known, reviewable version while still allowing intentional, explicit upgrades (e.g. via Dependabot).
Mapping (before → after)
actions/checkout@v7@v7.0.0actions/checkout@master@v7.0.0actions/setup-java@v5@v5.3.0actions/create-release@v1@v1.1.4actions/checkout@masterinrelease-notes.ymlwas a branch reference — the highest-risk case, since it tracks the action's development branch and could change at any time. It is now pinned tov7.0.0(matching the version already used in the other workflows).All version bumps stay within the same major version, so no breaking changes are expected.
Left untouched (already exact / not a moving ref):
docker://ghcr.io/rohwerj/release-notes-generator-action:v1.0.0— already an exact tag.codecov/codecov-actionlines — dead code, not executed../.github/...) — none present.Verification
actionlintruns clean (only pre-existing, unrelated shellcheck warnings in therelease-notes.ymlrun:script remain — not touched here).uses:line.Note
Tag-pinning protects against major drift. The next hardening step would be full-SHA pinning (
@<40-char-sha>), which also protects against a tag being re-pointed upstream — that could be a follow-up.