Skip to content

Pin docker actions to commit SHAs - #83

Merged
MansiVisuals merged 1 commit into
devfrom
codeql-pin-actions
Aug 1, 2026
Merged

Pin docker actions to commit SHAs#83
MansiVisuals merged 1 commit into
devfrom
codeql-pin-actions

Conversation

@MansiVisuals

Copy link
Copy Markdown
Owner

Clears the four actions/unpinned-tag alerts that CodeQL's actions pack raised on main after #82.

Alerts

[medium] actions/unpinned-tag — .github/workflows/test-dev-clean-install.yml:32, :35
[medium] actions/unpinned-tag — .github/workflows/test-dev-upgrade.yml:33, :36

Both dev test workflows referenced docker/setup-buildx-action@v4 and docker/build-push-action@v7 by 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

Action Was Now
docker/setup-buildx-action v4 bb05f3f5519dd87d3ba754cc423b652a5edd6d2c (v4.2.0)
docker/build-push-action v7 53b7df96c91f9c12dcc8a07bcb9ccacbed38856a (v7.3.0)

I verified each SHA is exactly what the major tag resolves to right now — v4 and v4.2.0 point at the same commit, likewise v7 and v7.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, and github/codeql-action are not flagged and are left alone — the rule exempts GitHub-owned actions.

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>
@MansiVisuals
MansiVisuals merged commit 75ca59a into dev Aug 1, 2026
4 checks passed
@MansiVisuals
MansiVisuals deleted the codeql-pin-actions branch August 1, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant