chore(actions): pin all workflow uses to commit SHA#4
Conversation
- Replace every github actions tag pin (e.g. actions/checkout@v4) with the immutable commit SHA across build-images.yml, validate.yml, and copilot-sandbox.yml. The original semver tag is kept as an inline comment so Dependabot can read and update both at once. - Add .github/dependabot.yml so SHAs stay current automatically via weekly grouped PRs (docker/* and actions/* grouped separately).
|
Warning Review limit reached
More reviews will be available in 42 minutes and 25 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Pins every GitHub Action reference in this repo's workflows to an immutable commit SHA, and adds a Dependabot config so the pins stay current automatically.
This applies the SHA-pinning hardening that CodeRabbit has been flagging on the last two PRs (PR #2 and PR #3) — addressed here as a single repo-wide change instead of step-by-step, which is the right granularity for a security policy.
Why
Tags like
@v3are mutable. If an action's maintainer account is compromised, the attacker can retarget the tag to point at malicious code, and every workflow using that tag will execute it on the next run with access to repo secrets (e.g.DOCKERHUB_TOKEN). This is what happened in thetj-actions/changed-filesincident (March 2025) and a few others since. Pinning to a full commit SHA makes the reference content-addressed — the SHA cannot point at different code without changing.Doing it per-step would leave the rest of the file inconsistent and not actually close the attack surface. Doing it repo-wide + automated keeps it sustainable.
Pin format
Each
uses:keeps the original semver tag as an inline comment so Dependabot can recognize and update both halves:Pinned references (7 actions, 14 occurrences across 3 workflows)
actions/checkoutv4.3.134e114876b0b11c390a56381ad16ebd13914f8d5docker/setup-qemu-actionv3.7.0c7c53464625b32c7a7e944ae62b3e17d2b600130docker/setup-buildx-actionv3.12.08d2750c68a42422c14e847fe6c8ac0403b4cbd6fdocker/login-actionv3.7.0c94ce9fb468520275223c153574b00df6fe4bcc9docker/metadata-actionv5.10.0c299e40c65443455700f0fdfc63efafe5b349051docker/build-push-actionv6.19.210e90e3645eae34f1e60eeb005ba3a3d33f178e8tj-actions/changed-filesv44.0.02d756ea4c53f7f6b397767d8723b3a10a9f35bf2Each SHA was resolved against the action's repo via the GitHub API at PR time.
Dependabot config
Adds
.github/dependabot.ymlwith thegithub-actionsecosystem and weekly grouped updates:docker-actionsgroup: alldocker/*actions bundled into one PRactions-orggroup: allactions/*actions bundled into one PRtj-actions/changed-files) get individual PRsGrouping limits PR noise while keeping related Docker-org actions versioned together (since they're often updated in sync).
Test plan
yq evalsmoke-tested all four files locally)validate.ymlruns on this PR and passesuses:step references change