Pin GitHub Actions to commit digests via Renovate - #80
Merged
Conversation
Add the `helpers:pinGitHubActionDigests` preset so Renovate rewrites every external `uses:` reference to `action@<full-sha> # vX.Y.Z` and keeps both the digest and the trailing version comment in sync. Tags are mutable: anyone able to move `actions/checkout@v6` owns our next CI run, silently and with no diff to review. Pinning by digest means a moved tag changes nothing for us until a Renovate PR lands, turning a silent swap into a reviewable one. The existing `minimumReleaseAge` of 3 days still applies, and GitHub Actions updates are not automerged, so every digest bump gets reviewed. Note that `pypa/gh-action-pypi-publish@release/v1` will also be pinned, so that branch ref stops floating and we rely on Renovate digest bumps instead. Local reusable workflow references are unaffected.
renovate.json matched none of the globs in .github/labeler.yml, so a PR touching only that file got no path-based label and tripped the require-release-label check with nothing the author could reasonably guess. Add it to kind/build, which covers build system, packaging and tooling — Renovate config is dependency tooling, even though some of what it bumps is GitHub Actions.
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.
Summary
Two small config changes.
1. Pin GitHub Actions to commit digests. Adds the
helpers:pinGitHubActionDigestspreset torenovate.json. Renovate will then rewrite every externaluses:reference toaction@<full-sha> # vX.Y.Zand keep both the digest and the trailing version comment in sync from then on.Git tags are mutable. Anyone able to move
actions/checkout@v6owns our next CI run — silently, with no diff, retroactively affecting workflows written months ago. Pinning by digest means a moved tag changes nothing for us until a Renovate PR lands, which turns a silent swap into a reviewable one. GitHub's secure-use guidance puts it plainly: "Pinning an action to a full-length commit SHA is currently the only way to use an action as an immutable release."2. Label
renovate.jsonin the labeler. It matched none of the globs in.github/labeler.yml, so a PR touching only that file got no path-based label and trippedrequire-release-labelwith nothing the author could reasonably guess. Added tokind/build— the label covers "build system, packaging and tooling", and Renovate config is dependency tooling even though part of what it bumps is Actions.What to expect
Renovate will open a one-time pin PR converting all external actions. After that, digest bumps ride along with the normal version PRs.
pypa/gh-action-pypi-publish@release/v1gets pinned too. That branch ref stops floating, so we rely on Renovate digest bumps for publishing fixes rather than picking them up implicitly. This is the one behavioral change; happy to exclude it with apinDigests: falserule if reviewers prefer the moving ref.The existing
minimumReleaseAge: 3 daysstill applies and Actions updates are not automerged, so every digest change gets human review. That review step is what makes the scheme worth anything — blind-automerging digest updates would just rebuild tag-following with extra steps.Related Issues
N/A — proactive supply-chain hardening.
Type of change
kind/*label describing the change —kind/ci, applied automatically since this touches.github/**.kind/breaking. — Not breaking; config-only, no runtime or API impact.Checklist
🤖 Generated with Claude Code