Repository navigation
Pin GitHub Actions with a workflow lockfile - #87
Merged
Merged
Conversation
Add a check that .github/workflows/actions.lock pins every action the workflows use to a verified commit, so that a tag moved upstream can't change what runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2bAq4pAVP2pbkPzbdLTn9
The patch the new check printed on its first run, which also narrows partial version refs to the full tags they were locked at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2bAq4pAVP2pbkPzbdLTn9
ScreenshotsFrom run 43135066656, against a real Clementine. Left: main. Right: this pull request, light and dark.
Screens at a failure |
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.





































Requested by John · project thread
Pins every GitHub Action this repository's workflows use with a workflow lockfile.
.github/workflows/actions.lockrecords the commit eachuses:ref resolved to, including the actions those actions use in turn, and GitHub runs those commits. A tag that's moved upstream, by a compromised maintainer account for example, can't change what our workflows run.Changes
.github/workflows/actions.lock, generated bygh actions-lockv0.4.1. It also narrows partial version refs in the workflows (@v3) to the full tag they were locked at, so that the workflows say what runs..github/workflows/actions-lock.ymlrunsgh actions-lock --verifyon pull requests, on pushes to the default branch and weekly, so auses:change without a lockfile update, or a locked tag moved upstream, fails. When it fails, its log ends with the patch that fixes the lockfile, also kept as theactions-lock-fixartifact.To change a workflow's
uses:from now on:and commit
.github/workflows/actions.lockwith the change.Not covered: reusable workflows from other repositories, and container images (
container:), which the lockfile doesn't pin.Enforcing the lockfile (the Require lockfile policy, which blocks workflows that aren't in it) is a repository or organization setting, not part of this change.
Generated by Claude Code