Skip to content

Pin GitHub Actions to commit digests via Renovate - #80

Merged
Mark90 merged 2 commits into
mainfrom
pin-github-action-digests
Aug 13, 2026
Merged

Pin GitHub Actions to commit digests via Renovate#80
Mark90 merged 2 commits into
mainfrom
pin-github-action-digests

Conversation

@Mark90

@Mark90 Mark90 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Two small config changes.

1. Pin GitHub Actions to commit digests. Adds the helpers:pinGitHubActionDigests preset to renovate.json. Renovate will then rewrite every external uses: reference to action@<full-sha> # vX.Y.Z and keep both the digest and the trailing version comment in sync from then on.

Git tags are mutable. Anyone able to move actions/checkout@v6 owns 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.json in 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 tripped require-release-label with nothing the author could reasonably guess. Added to kind/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/v1 gets 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 a pinDigests: false rule if reviewers prefer the moving ref.
  • Local reusable workflow references are unaffected.

The existing minimumReleaseAge: 3 days still 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

  • I have set a kind/* label describing the change — kind/ci, applied automatically since this touches .github/**.
  • If this is a breaking change, I have set kind/breaking. — Not breaking; config-only, no runtime or API impact.

Checklist

  • I have updated relevant documentation. — No user-facing docs cover Renovate config.
  • My code follows the style guidelines of this project.

🤖 Generated with Claude Code

Mark90 added 2 commits August 13, 2026 11:41
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.
@github-actions github-actions Bot added the kind/ci CI, GitHub Actions and workflow changes label Aug 13, 2026
@Mark90
Mark90 merged commit b3ddeeb into main Aug 13, 2026
22 checks passed
@Mark90
Mark90 deleted the pin-github-action-digests branch August 13, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/ci CI, GitHub Actions and workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant