Skip to content

🔒 ci: lock workflow actions with a lockfile - #62

Merged
gaborbernat merged 4 commits into
mainfrom
actions-lockfile
Nov 10, 2026
Merged

gaborbernat merged 4 commits into
mainfrom
actions-lockfile

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Every action these shared workflows run is now locked to a commit through a workflow lockfile, generally available since 2026-10-28. 🔒 The lock reaches every repository that calls them: a moved or rewritten tag on an action fails the job before any step runs, even in a caller that has no lockfile of its own.

The runner enforces the lockfile; gh-actions-lock writes it and also turns the SHA pins in uses: back into tags, so the workflows read actions/checkout@v7.0.1 again. A new reusable verify-actions-lock.yaml runs gh actions-lock --verify and fails when a workflow uses an action the lockfile does not cover. This repository's checks call it, and any repository that adopts a lockfile can call it the same way.

zizmor moves to 1.32.0, which reads the lockfile; 1.31.1 flags each tag ref as unpinned-uses. It checks only that a workflow is listed, not that each action has an entry, so a missing entry fails only the verify job.

Evidence

A throwaway workflow in tox-dev/python-sbom ran cooled-hooks.yaml from this branch twice. At the branch head the job passed and logged that it used the locked versions. At a commit that pins actions/checkout to an unreachable SHA, the job failed during set up with Lockfile pin f548e57… for actions/checkout does not match ref v7.0.1.

Outside the lockfile

  • Reusable workflow calls keep their SHA pins; the actions inside them follow the defining repository's lockfile.
  • Composite actions in this repository keep their SHA pins, since a lockfile covers workflows only.
  • The ossf/scorecard-action container image is not pinned by digest, as the extension warns.

@gaborbernat gaborbernat added the enhancement New feature or request label Nov 10, 2026
@gaborbernat
gaborbernat marked this pull request as ready for review November 10, 2026 01:56
@gaborbernat
gaborbernat merged commit 9fac56f into main Nov 10, 2026
12 checks passed
@gaborbernat
gaborbernat deleted the actions-lockfile branch November 10, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant