Harden trusted release source checkout - #56
Merged
Conversation
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.
What changed
masterand exact event/input SHA equality before Compatibility startsorigin/masterbefore repository code runs in preflight and publish jobsWhy
CodeQL identified seven high-severity cache-poisoning findings that all originated from one root cause: a
workflow_dispatchinput was used as the executable checkout ref before local actions, installs, builds, and package inspection. The previous post-checkout SHA validation was fail-closed at runtime but did not remove the untrusted-code execution boundary, and the parallel Compatibility gate could execute before that validation.Impact
Trusted Release still accepts an exact reviewed source SHA, but the input is now an assertion only. Executable source always comes from the immutable workflow event commit on protected
master. Accidental unconfirmed dispatches also avoid the eight-lane Compatibility cost.Validation
VITEST_MAX_WORKERS=2 pnpm verify— 59 files / 547 tests; coverage 94.10% statements, 86.13% branches, 98.40% functions, 94.58% linespnpm example:typecheckgit diff --check