Repository navigation
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
Plumber reads GitHub workflow lockfiles (#542, follow-ups in #545), but this repository has none. Our workflows pin every action to a commit SHA, but those pins have gaps:
- nothing checks that the repository behind a name is still the one we pinned (the lockfile stores
owner_id/repo_idand GitHub checks them at run time), - nothing pins the actions our actions call (the lockfile records transitive dependencies),
- nothing enforces them: a new workflow or a new step with
@v1runs without complaint.
Describe the solution you'd like
Onboard every workflow in .github/workflows/ to .github/workflows/actions.lock, then turn on the Require lockfile workflow execution policy so a workflow the lockfile doesn't cover can't run.
Onboarding (one PR)
-
gh extension install github/gh-actions-lock, then rungh actions-lockfrom the repository root to cover all 10 workflows. - Review the whole diff: the extension also rewrites
uses:refs (to exact versions, and./…to$/…, e.g. the./.github/workflows/propagate.ymlcall inrelease.yml). Decide whether to keep the SHA pins with their# vXcomments or let the lockfile hold the pins. - Add
.github/workflows/actions.locktoCODEOWNERSand require code owner review for it. - Add a verify job that runs
gh actions-lock --verifyon pull requests and make it a required check. Optional: a pre-commit hook withgh actions-lock --verify-local --no-fix. - Check that Dependabot (github-actions ecosystem, already in
.github/dependabot.yml) regenerates the lockfile entry in its bump PRs. It doesn't onboard new workflows, so a new workflow needsgh actions-lockby hand. - Check the org/repo allowed-actions list: tag-based entries (
owner/action@v1) no longer match locked SHAs, so use a wildcard or a full SHA. - Dogfooding: the
plumber-action.ymlrun on this repository should report the locked refs as pinned (Read GitHub workflow lockfiles (.github/workflows/actions.lock): locked refs count as pinned in ISSUE-701, lockfile consistency control, resolve the locked commit in 702/703 #542).
Enforcement (after the onboarding PR is merged)
- Settings → Actions → Policies → new workflow execution policy → Require lockfile, at org level if possible, otherwise on this repository. Set it to Active: Evaluate mode only exists on GitHub Enterprise Cloud.
- Target this repository and every onboarded workflow.
- Check it works: on a scratch branch, a workflow (or step) missing from the lockfile must be blocked.
Notes
- The feature is in public preview and may change.
- Turn the policy on only after the lockfile is on
main, or runs that aren't onboarded yet get blocked. - Lockfile changes are dependency changes: a changed
commitis new code that will run, and a changedowner_id/repo_idneeds a look before merging. Never edit the file by hand.
References
- Concept: https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles
- Locking a repository's workflows: https://docs.github.com/en/actions/how-tos/secure-your-work/lock-workflow-dependencies
- Enforcing lockfiles: https://docs.github.com/en/actions/how-tos/administer/enforce-workflow-lockfiles
- Workflow execution policies: https://docs.github.com/en/actions/how-tos/administer/control-workflow-execution
- Extension: https://github.com/github/gh-actions-lock
- Related: Read GitHub workflow lockfiles (.github/workflows/actions.lock): locked refs count as pinned in ISSUE-701, lockfile consistency control, resolve the locked commit in 702/703 #542, Workflow lockfile follow-ups: transitive dependencies (702, 703, 713), staleness check, require-lockfile policy as a positive signal #545
Activity
Exypte commentedon Oct 22, 2026
I'm working on this one, a fix is on the way.