Pin docker actions to commit SHAs - #83
Merged
Merged
Conversation
CodeQL's actions pack flagged four actions/unpinned-tag alerts: the two dev test workflows referenced docker/setup-buildx-action and docker/build-push-action by mutable major tag, so an upstream tag move would silently change what runs in CI. Pinned to the commits v4 and v7 currently resolve to, with the version kept in a trailing comment for readability. No behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Clears the four
actions/unpinned-tagalerts that CodeQL'sactionspack raised onmainafter #82.Alerts
Both dev test workflows referenced
docker/setup-buildx-action@v4anddocker/build-push-action@v7by mutable major tag. Those tags are moved by the upstream maintainers, so what actually runs in CI can change without any commit here — and these two workflows build the image from source and run it, so a compromised or simply changed action has real reach.Change
docker/setup-buildx-actionv4bb05f3f5519dd87d3ba754cc423b652a5edd6d2c(v4.2.0)docker/build-push-actionv753b7df96c91f9c12dcc8a07bcb9ccacbed38856a(v7.3.0)I verified each SHA is exactly what the major tag resolves to right now —
v4andv4.2.0point at the same commit, likewisev7andv7.3.0— so this pins the version already running and changes no behaviour. The version stays in a trailing comment so the file is still readable, and Dependabot understands that format for future bumps.actions/checkout,actions/upload-artifact, andgithub/codeql-actionare not flagged and are left alone — the rule exempts GitHub-owned actions.