Verify locked manifests in online runs that keep recorded pins by nodeselector · Pull Request #212 · github/gh-actions-lock · GitHub
Skip to content

Verify locked manifests in online runs that keep recorded pins - #212

Merged
nodeselector merged 3 commits into
mainfrom
nodeselector-verify-locked-manifests
Oct 21, 2026
Merged

nodeselector merged 3 commits into
mainfrom
nodeselector-verify-locked-manifests

Conversation

@nodeselector

@nodeselector nodeselector commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator
  • --verify, --no-fix and default runs now read each locked composite's action.yml at its locked commit and check its children are in the lockfile.
  • A missing child or a missing manifest is a new incomplete-lockfile error, fixed with --relock. A read GitHub doesn't answer is a retryable error.
  • Cost on a healthy lockfile: one extra batched request, plus one per composite nesting level. A writable --relock costs nothing extra.

Read each locked action's manifest at its locked commit and block when a
composite uses an action its lockfile entry does not record, or when the
manifest is missing. Reads are batched across workflows, one request per
nesting level, and skipped where this run already read the manifest live.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@nodeselector
nodeselector requested a review from a team as a code owner October 21, 2026 03:30
Copilot AI max review requested due to automatic review settings October 21, 2026 03:30
A manifest that can't be read leaves its dependencies unverified, so it
blocks like any unanswered check: exit 1 with retryable set in --json,
and an abort behind the Dependabot proxy. Retryable is added with the
same name and JSON key as the retry work that introduces it elsewhere.

Locked-manifest reads carry their own GraphQL label.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Manifest verification can reject valid actions and leave reused dependencies unchecked.

4 open issues
What changed in this PR

Adds online verification of locked action manifests so retained pins are checked for missing dependencies.

Changes:

  • Traverse manifests at locked commits, batching reads by nesting level.
  • Track seeded resolutions and read-only runs.
  • Add verification tests and update request-count expectations and documentation.
File Description
README.md Documents locked-manifest verification.
internal/​resolve/​resolver.go Identifies lockfile-seeded resolutions.
internal/​resolve/​discovery.go Shares nested-use parsing and batches manifest reads.
internal/​resolve/​cacheentry.go Marks seeded cache entries.
internal/​pipeline/​run.go Passes read-only mode into parity checks.
internal/​pipeline/​parity.go Collects manifest traversal roots.
internal/​pipeline/​manifests.go Traverses manifests and reports dependency gaps.
internal/​pipeline/​manifests_test.go Tests read outcomes and edge matching.
internal/​pipeline/​disposition.go Adds read-only parity state.
cmd/​gh-actions-lock/​selfrepository_test.go Handles manifest reads in transport fixtures.
cmd/​gh-actions-lock/​run.go Passes CLI read-only state.
cmd/​gh-actions-lock/​run_test.go Covers verification failures, batching, modes, and retries.
cmd/​gh-actions-lock/​parity_test.go Updates mocks and request counts.
cmd/​gh-actions-lock/​command_test.go Adds manifest HTTP fixtures.
cmd/​gh-actions-lock/​check_json_golden_test.go Stubs manifest reads for JSON tests.

Review effort: Max

Comment thread internal/pipeline/manifests.go Outdated
Comment thread internal/pipeline/manifests.go Outdated
Comment thread internal/pipeline/manifests.go Outdated
Comment thread internal/pipeline/parity.go Outdated
- Accept a Dockerfile, the runner's fallback, where a locked action has
  no action.yml or action.yaml.
- Treat any failed read as unverified, including a missing commit under
  a reused seed that parity never checked.
- Report manifest mismatches as incomplete-lockfile, which a plain run
  doesn't repair, with its own label and remediation.
- Walk seeded children reached through a live composite.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@nodeselector
nodeselector merged commit 748cba9 into main Oct 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants