Skip to content

fix(ci): Dependabot leaves attested reusable workflows alone; add the re-attest tool - #696

Open
hyperpolymath wants to merge 2 commits into
mainfrom
claude/dependabot-pinned-source-gap
Open

hyperpolymath wants to merge 2 commits into
mainfrom
claude/dependabot-pinned-source-gap

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Stacked on #694. The base is #694's branch, because main's pinned-source audit stays red until #694 merges. Retarget to main after it merges.

The gap

#686 (Dependabot) bumped an attested reusable-workflow pin, hyperpolymath/hypatia/.github/workflows/credential-read-check.yml, without re-attesting it. Its own Pinned source closure and E2E tests failed, but that didn't block the merge, so main went red. Dependabot can't re-attest a pin, so these pins shouldn't be its to move.

Change

  • .github/dependabot.yml: one name-only ignore entry for each active source in scripts/lib/pinned-reusable-sources.json. The names use Dependabot's own form for a reusable workflow, owner/repo/.github/workflows/file.yml, as in chore(deps): bump the actions group across 1 directory with 2 updates #686's body. The entries are name-only, like the existing CodeQL hold, because a SHA re-bump slips past a version-scoped ignore. Ordinary actions keep auto-updating.
  • scripts/reattest-pinned-source.sh: the deliberate way to move an attested pin.
    • It moves the manifest pin and re-emits the receipt (audit-lock-closure.sh --emit-receipt) only when no judgement is needed:
      • the file is byte-identical at the new commit (same blob and sha256);
      • every caller already calls the new commit;
      • no other record shares the old commit;
      • the receipt block has the usual layout.
    • Anything else is refused (exit 3, nothing changed) with the reason. A changed file prints its new uses: lines for review.
    • It ends by running the pinned-source audit.
  • Tests, both run in the Pinned source closure job:
    • dependabot-attested-ignore-test.sh checks that the ignore list equals the manifest's active sources. Negative controls cover missing, stale and version-scoped entries. It parses YAML with Ruby, which the runner already has, so no new action is needed and actions.lock is unchanged.
    • reattest-pinned-source-test.sh (29/29) covers the move on a fixture, an idempotent rerun, five refusals, bad arguments, and a replay of chore(deps): bump the actions group across 1 directory with 2 updates #686 on main@dec1e7c. The replay is reported NOT RUN, never passed, when github.com or that commit isn't available.

Evidence

Not in this PR (owner action)

Make Pinned source closure and E2E tests required status checks on main. That's a branch-protection setting, so code can't change it. It's the half of the fix that would have stopped #686 from merging.


Generated by Claude Code

#686 (Dependabot actions bump) moved hypatia-scan.yml's reusable call to
hyperpolymath/hypatia/.github/workflows/credential-read-check.yml from
b93f0615 to 29a9e4a8 without updating the pinned-source manifest or the
closure receipts, so 'Pinned source closure' (and E2E, which requires it)
has failed on main since 6a6b748 with SOURCE-ACTIVE-MISSING, and on every
PR merged with main.

Fetched both commits from hyperpolymath/hypatia: the workflow is byte-
identical at both (blob 15c597ea, sha256 645e8ac8...), and its only uses
are step-security/harden-runner@1d88384f. So only the commit moves:

- pinned-reusable-sources.json: the record's commit -> 29a9e4a8 (blob,
  content_sha256 and uses unchanged, verified against the fetched file).
- lock-closure-receipts.tsv: the receipt block re-emitted with
  audit-lock-closure.sh --emit-receipt from the fetched source.

audit-pinned-reusable-sources.sh: findings 1 -> 0. audit-lock-closure.sh:
fatal 1 -> 0 (review/accepted/not-run counts unchanged).
pinned-reusable-sources-test: 55/55.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDhFeexmokLqLRfZNce
… re-attest tool

#686 showed the gap: Dependabot bumped an attested reusable-workflow pin
(hypatia credential-read-check) without re-attesting it, and its own
'Pinned source closure' and 'E2E tests' failures did not stop the merge, so
main went red. Dependabot cannot re-attest, so these pins must not be its to
move.

- .github/dependabot.yml: a name-only ignore for each ACTIVE source in
  scripts/lib/pinned-reusable-sources.json, using Dependabot's own name for a
  reusable workflow (owner/repo/.github/workflows/file.yml, as in #686's
  body). Name-only, like the CodeQL hold: a SHA re-bump slips past a
  version-scoped ignore. Ordinary actions keep updating.
- scripts/reattest-pinned-source.sh: the deliberate path. It moves one pin
  in the manifest and re-emits its receipt (audit-lock-closure.sh
  --emit-receipt) only when no judgement is needed: the file is byte-
  identical at the new commit, every caller already calls it, no other
  record shares the old commit, and the receipt block has the usual layout.
  Anything else is refused with the reason, exit 3, nothing changed. It
  ends by running the pinned-source audit. Replayed on main@dec1e7c it
  reproduces #694 byte for byte.
- scripts/tests/dependabot-attested-ignore-test.sh: the ignore list equals
  the manifest's active sources (missing, stale and version-scoped entries
  each fail; negative controls). Ruby YAML, already on the runner.
- scripts/tests/reattest-pinned-source-test.sh: fixture move, idempotent
  rerun, five refusals, bad arguments, and the #686 replay when github.com
  and the commit are available (NOT RUN otherwise, never passed). 29/29.
- e2e.yml: both suites run in the 'Pinned source closure' job. No new
  action, so actions.lock is unchanged (check-lock-sync clean).

Making 'Pinned source closure' and 'E2E tests' required on main is a
branch-protection setting for the owner; this change cannot make it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDhFeexmokLqLRfZNce
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 464fa73 and d74a1c4.

Files ignored due to path filters: 1

  • scripts/lib/lock-closure-receipts.tsv is excluded by !**/*.tsv
Files selected for processing: 6

  • .github/dependabot.yml
  • .github/workflows/e2e.yml
  • scripts/lib/pinned-reusable-sources.json
  • scripts/reattest-pinned-source.sh
  • scripts/tests/dependabot-attested-ignore-test.sh
  • scripts/tests/reattest-pinned-source-test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 17, 2026 22:07
@hyperpolymath
hyperpolymath changed the base branch from claude/reattest-hypatia-credential-read-check to main November 18, 2026 00:51

This branch has not been deployed

No deployments
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.

3 participants