Name every action by a tree that cannot change under it - #503
Merged
Conversation
Scoping the release-write grant removed the worst thing a changed action could do; it did not stop one from running. Every workflow referenced `actions/checkout@v4` and `actions/setup-node@v4`, and a major tag is a moving pointer: the same reference can resolve to different code tomorrow, in jobs that read this repository and hold their own tokens. Twenty-six references now name a digest. The versions do not move -- both digests are what `v4` resolves to today, verified against the GitHub API -- so this changes what the reference guarantees rather than what runs. A test fails on any `uses:` that is not a forty-character digest, because the next workflow someone adds will be written by copying an existing line, and copying is how the property would quietly end. One correction rides along. A test was named for keeping the canonical commit at the event sha, which is a property of the workflow wiring rather than of the script it drives; the case itself shows the resolver answering for the commit it is handed. It says that now, and the workflow-shape case next to it asserts the other half. A name that claims more than its body runs is the failure this suite exists to catch. Limit: pinning fixes the tree, not its behaviour -- a pinned action still runs with the job's token and can read this repository, and upgrading now requires deliberately resolving a new digest rather than inheriting one Ruled-out: upgrading to the latest major while pinning | two changes in one, and a version bump that arrives inside a security fix gets reviewed as a security fix Ruled-out: a dependency bot to keep digests current | the pin is what removes silent movement, and a bot that updates it automatically restores the property being removed Warn: no comment can keep a digest honest, so the `# v4` beside each is a label rather than a check; the version it names is verified once, here Blast: system Undo: easy Certainty: firm Verified: both digests resolve to the current `v4` tags through the API, all four workflows still parse as YAML, no unpinned `uses:` remains outside local `./` references, and the thirty-four release-gate cases pass including the new one Provenance: authored Record-Id: r-pindigest
CommitLore — record lintTrailers: clean — 1 commit in Active constraints for the paths this PR touchesLimits (24)
Ruled out (82)
Warnings (19)
Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
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.
Follow-up to the release-path work; the
Limit:line of #501 named this as the remaining exposure.Scoping the release-write grant removed the worst thing a changed action could do. It did not stop one from running. Every workflow referenced
actions/checkout@v4andactions/setup-node@v4, and a major tag is a moving pointer — the same reference can resolve to different code tomorrow, in jobs that read this repository and hold their own tokens.26 references now name a digest. The versions do not move: both digests are what
v4resolves to today, verified against the GitHub API. This changes what the reference guarantees, not what runs.A test fails on any
uses:that is not a 40-character digest — the next workflow someone adds will be written by copying an existing line, and copying is how the property would quietly end.One correction rides along
A test was named for keeping the canonical commit at the event SHA. That is a property of the workflow wiring, not of the script the test drives; the case itself shows the resolver answering for the commit it is handed. It says that now, and the workflow-shape case beside it asserts the other half. A name that claims more than its body runs is the failure this suite exists to catch — it was written during the #499 review and lost when the work moved worktrees.