Skip to content

Pin GitHub Actions to commit SHAs - #4844

Merged
marcoacierno merged 1 commit into
mainfrom
pin-github-actions-to-sha
Nov 7, 2026
Merged

marcoacierno merged 1 commit into
mainfrom
pin-github-actions-to-sha

Conversation

@marcoacierno

Copy link
Copy Markdown
Member

What

Pins every external action in .github/workflows/ to a full commit SHA instead of a mutable tag, so a retagged or compromised action can't change what runs in CI.

  • Each SHA is the commit the existing tag resolves to today, so behaviour is unchanged. A trailing # vX.Y.Z comment names the exact release so Dependabot can bump SHA and comment together.
  • actions/checkout@master in opentofu-lint.yml (a branch, not a release) is pinned to the same v6.1.0 SHA the other workflows use.
  • astral-sh/setup-uv was already SHA-pinned; only the # v8.1.0 comment was added.
  • Local refs (./.github/workflows/*, ./.github/actions/wait-for-deployment) are unchanged.

Dependabot now covers the github-actions ecosystem:

  • Weekly on Monday, all action bumps grouped into a single PR.
  • cooldown.default-days: 7: a release must be at least 7 days old before it is proposed. Dependabot security updates are not subject to cooldown.

ToDo

  • Several actions are on old majors (actions/github-script@v3, peter-evans/slash-command-dispatch@v2, peter-evans/create-or-update-comment@v1, opentofu/setup-opentofu@v1, actions/setup-python@v5). The grouped Dependabot PR will propose bumping them; review those for breaking changes.

Tags are mutable, so a compromised or retagged action could change what
runs in CI. Every external action is pinned to the commit its current tag
resolves to, with the exact release in a trailing comment for Dependabot.

actions/checkout@master in opentofu-lint is pinned to v6.1.0 to match
the other workflows.

Dependabot now tracks the github-actions ecosystem weekly in one grouped
PR, with a 7-day cooldown so new releases age before being proposed.
@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pycon Building Building Preview Nov 7, 2026 1:47am UTC

@marcoacierno
marcoacierno merged commit 20da354 into main Nov 7, 2026
10 of 11 checks passed
@marcoacierno
marcoacierno deleted the pin-github-actions-to-sha branch November 7, 2026 01:47
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.41%. Comparing base (c6b26c0) to head (0d896d9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4844   +/-   ##
=======================================
  Coverage   92.41%   92.41%           
=======================================
  Files         360      360           
  Lines       10920    10920           
  Branches      946      946           
=======================================
  Hits        10092    10092           
  Misses        706      706           
  Partials      122      122           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was successfully deployed

1 active deployment
Preview — 0d896d98 Deployed Nov 7, 2026 by vercel[bot]
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