Repository navigation
ci: move the standards reusable pins to 75d38f80 and SHA-pin every uses: - #1230
hyperpolymath wants to merge 5 commits into
Conversation
Moves the five metadatastician/standards reusable-workflow pins (governance, hypatia-scan, mirror, scorecard, secret-scanner) from 7641c7f (2026-11-06) to standards main 75d38f80, with actions.lock relocked to match. Why: the baseline gate at 7641c7f runs an apply-baseline.sh that blocks findings marked `advisory: true`. Standards c7d75c00 (#1668, 2026-11-18) exempts that class, as RE011's own @doc anticipates. A flag-only rule (RE011 today, RE012 next) then reports without turning the gate red. Made with standards' own tools, not by hand: propagate-workflow-pins.sh --fix --to 75d38f80 . (pins + relock) relock-standards-pin.sh --to 75d38f80 (already keyed) check-lock-sync.sh .github/workflows (in sync) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDgzT72Tq2HTJmikyNg
|
Review these changes at https://app.gitnotebooks.com/hyperpolymath/hypatia/pull/1230 |
|
Warning Review limit reachedYou'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 22 minutes. View limit details
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Security's cargo audit and cargo deny fail on main and here: url 2.5.8 carries RUSTSEC-2026-0592. Same Cargo.lock as #1225 and as f8332b4 on #1195 (cargo update -p url --precise 2.5.9); a no-op once #1225 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDgzT72Tq2HTJmikyNg
The lock pin contract needs each actions.lock key to be a 40-hex commit. relock-sha-keys.sh keeps a tag key while a workflow still writes the tag, so the 34 tag-keyed records could not be re-keyed while 213 `uses:` lines named tags. Rewritten with standards scripts/pin-uses-from-lock.sh --write (metadatastician/standards#1704): each `owner/repo@<tag>` becomes `owner/repo@<sha> # <tag>`, the SHA being the commit this lock already recorded for that tag, so no action version changes. 213 lines in 26 workflows; 9 were already SHA-pinned. Then relock-sha-keys.sh (6 records merged), complete-job-refs.sh and prune-stale.sh (no changes) at the standards pin 75d38f80. Checked at 75d38f80: check-lock-sync.sh exit 0; check-lock-pin-contract.sh 0 violations (34 before); update-actions-lock.sh --verify-local exit 0 (107 advisory findings, none blocking). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDgzT72Tq2HTJmikyNg
|
CI on The one red item is the commit status
No fix exists yet. How to handle the config is put to the owner, because the same file is in gitbot-fleet and proof-burrower. Generated by Claude Code |
…A pins from its own lock (#1704) ## Why The lock pin contract (canon rule 10, `check-lock-pin-contract.sh`, enforced on callers since `2b543da1`) needs every `actions.lock` key to be a 40-hex commit. But `relock-sha-keys.sh` deliberately keeps a tag key while any workflow still writes that tag. So a caller that writes `uses: actions/checkout@v7.0.1` can't satisfy the contract with the repair chain alone. The measured case is hyperpolymath/hypatia: 212 tag-form `uses:` lines across 26 workflows, and 34 contract violations. That is what keeps [hyperpolymath/hypatia#1230](hyperpolymath/hypatia#1230) red. The same class applies to the other ledgered callers. ## What `scripts/pin-uses-from-lock.sh [--write] [<workflows-dir>]` rewrites each `uses: owner/repo[/path]@<tag>` to `owner/repo[/path]@<sha> # <tag>`. - **Where the SHA comes from:** the caller's own lock record (`commit: 'sha1-…'`). The rewrite needs no network and changes no action version. - **Dry run by default.** It prints TSV (`file line old-ref new-ref verdict`) on stdout and a summary on stderr. Pass `--write` to apply. - **What it preserves:** - single and double quotes, with the comment placed after them - sub-path actions - each workflow's own spelling of owner/repo - a missing final newline - **Case handling:** owner/repo folds case, because `gh actions-lock` writes keys in lower case (`swatinem/rust-cache`). A ref keeps its case. - **What it leaves alone and reports:** expression refs, lines already pinned, lines with a comment, and tags with no lock record. - **When it refuses:** - exit 1 when the lock is missing, or when a record's commit is not `sha1-<40 hex>` - exit 2 on a usage error - `check-lock-pin-contract.sh` now names this remedy in its `INVALID … key ref is not a 40-hex commit` message. ## Evidence - `bash scripts/tests/pin-uses-from-lock-test.sh`: 33 passed, 0 failed. It is also run under mawk in `self-test.yml`. - Nine mutants of the script each fail the suite: - no case fold on the lock side - no case fold on the lookup - dry run writes - final newline dropped - quotes dropped - comment ignored - ref case folded - bad commit accepted - expression pinned - `PATH=<yq v4>:$PATH bash scripts/tests/check-lock-pin-contract-test.sh`: 36 passed, 0 failed. - `shellcheck` is clean on both new files. - End to end on a copy of hypatia's `.github`: 1. Ran `--write`: 213 lines pinned, 9 already pinned. 2. Ran `relock-sha-keys.sh`, then `complete-job-refs.sh`, then `prune-stale.sh`. 3. Results: - `check-lock-sync.sh`: exit 0 - `check-lock-pin-contract.sh`: 0 violations, down from 34 - `update-actions-lock.sh --verify-local`: exit 0 - `close-lock.sh` stops (exit 3) on the nested `metadatastician/standards@bfa851f…` edge. That happens on main's tree too, the gate does not use it, and this PR does not change it. ## Not in this PR - Applying the script to hypatia. That follows as a hypatia PR once this lands, or from this branch's commit. - Composite actions under `.github/actions/`. They are not read, matching `relock-sha-keys.sh`. --- _Generated by [Claude Code](https://claude.ai/code)_ Co-authored-by: Claude <noreply@anthropic.com>
|



Summary
This PR moves hypatia's five
metadatastician/standardsreusable-workflow pins from7641c7f(2026-11-06) to standards main75d38f80, and relocksactions.lockto match. The five workflows are governance, hypatia-scan, mirror, scorecard and secret-scanner.Why move the pin: the baseline gate.
7641c7f,governance / Validate Hypatia Baselineruns anapply-baseline.shthat blocks findings markedadvisory: true.c7d75c00(#1668, 2026-11-18) exempts that class atmediumor below.<<<"$(cmd)"that drops the writer's exit status.Second change: every tag-form
uses:is now SHA-pinned.75d38f80the lock pin contract (canon rule 10,check-lock-pin-contract.sh) applies to callers, and hypatia's lock failed it in 34 places.relock-sha-keys.shkeeps a tag key while a workflow still writes the tag.uses:lines in 26 workflows now readowner/repo@<sha> # <tag>. Each SHA is the commit this lock had already recorded for that tag, so no action version changes.How it was made
All with standards' own scripts; nothing was hand-edited.
actions.lockis tool-owned.scripts/propagate-workflow-pins.sh --fix --to 75d38f80 .moved the five standards pins and relocked.scripts/pin-uses-from-lock.sh --write, from standards#1704, pinned 213 lines. 9 were already pinned.relock-sha-keys.shmerged 6 records.complete-job-refs.shandprune-stale.shchanged nothing.Evidence
Run locally with the scripts at
75d38f80, using mikefarah yq v4.52.4 and gh-actions-lock v0.2.0:check-lock-sync.sh .github/workflows: exit 0.check-lock-pin-contract.sh: 0 violations. Before step 2 there were 34.update-actions-lock.sh --verify-local: exit 0, with 107 advisory findings and none blocking. They aresha-as-ref(expected now) andstaleon the standards reusable edges, which main's tree also has.uses:line. Every added line has the form@<40-hex> # <tag>.Not verified
close-lock.shstops on the nestedmetadatastician/standards@bfa851f5…edge. It does that on main's tree too, and the gate does not run it.🤖 Generated with Claude Code
https://claude.ai/code/session_01J4QvDgzT72Tq2HTJmikyNg