fix(bootstrap): refuse a commit-SHA pin with a pin-a-release-tag remedy, and stop recommending SHA pins (#1514) #1515
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
loop/paused
mirror-drift
priority
critical
priority
high
priority
low
priority
medium
size
L
size
M
size
S
size
XL
status
blocked
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
frankenbit/release-toolkit!1515
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/1514-sha-pin-bootstrap-refusal"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #1514
Implements option (D) of #1514, as decided in comment 114178: refuse a commit-SHA pin at
bootstrap rtwith a remedy, and narrowdocs/SECURITY.mdto what ships.What changes
scripts/bootstrap-rt.sh: the*)arm now recognises a 7–40 character hex ref as a commit pin. It refuses with the gate's name, the classification and the remedy: "toolkit ref '…' looks like a commit SHA … Pin a release tag instead (uses: ...@vX.Y.Z)". Any other unknown ref keeps the genericunsupported toolkit refrefusal. Exit status stays 1, and neither FETCH nor BUILD is reached.composite/bootstrap-rt/action.yml: therefinput description names all three outcomes.docs/SECURITY.md: it stops recommendinguses:@<full-commit-SHA>. The second checkout still follows a SHA pin, but every reusable that installsrtrefuses one, and onlyreusable-workflow-parse-check.ymlworks SHA-pinned. Lines 7, 35–37, 43 and 72–82 change, and the:72heading no longer claims the gap is closed for SHA-pinned consumers.tests/bootstrap-rt.bats: three new tests, plus a negative assertion on the existingfeature/861test. Details under Verification.changelog.d/1514-sha-pin-bootstrap-refusal.fixed.md: adopter-visible, because the SECURITY.md recommendation is withdrawn.Decision tree
Where the refusal lives.
bootstrap-rt.sh(this PR) is right when the resolve-ref SHA arms should keep working where they can. It is one file, the second checkout still follows the SHA, workflow-parse-check keeps running SHA-pinned, and a later functional option (#1514's C, or A/B) reuses the arms unchanged.workflows.batstest, and it would have to be put back if a functional option lands.Which refs get the SHA message.
'main'. #1514's AC 9 asked for the short row to be handled or split off, and one regex range handles it. A branch named, say,deadbeefwould get "looks like a commit SHA" instead of "unsupported". It is refused either way, and the remedy is the same.What SECURITY.md says about a tag pin. Only what was already there. This PR narrows the SHA claims and adds nothing about what a tag pin guarantees for the
rtbinary. That is a separate question and is not folded in here.Deliberately untouched: the comment on each of the 18 resolve-ref SHA arms still says the arm "closes the audit-boundary gap SECURITY.md names". That remains true of the second checkout, which is all the comment describes. Rewording 18 copies (9
.forgejo+ 9 regenerated.giteatwins) is churn that (D) does not need. Say so if you want it in this PR.Self-bootstrap (AGENTS.md section 2)
No re-pin: toolkit-self floats
@main(AGENTS.md §2.1).scripts/bootstrap-rt.shand the composite are not ingates.DefaultComposeScripts, and a toolkit-self run builds from its own workspace. Adopters get the new refusal from the first cut tag that contains this commit, because the composite and the script are read from.release-toolkit, checked out at the resolved ref.Verification
Run on an LF clone at
0156d84(base4ffde69= livemain), inrt-bats:local(golang:1.25 + bats, jq, python3-yaml, shellcheck):bats tests/(the CI invocation)shellcheck scripts/bootstrap-rt.sh,bash -nyaml.safe_loadon the compositepython3 scripts/anchor-check.py(renderergit.frankenbit.de)python3 scripts/dated-examples-check.pyFRAGMENT_CHECK_COVERAGE=content rt fragment-check changelog.drt register-check --stdinon each changed fileac_closure_check.go:21+ qualified form) on title, body and commitThe composition test (
every reusable's resolve-ref -> bootstrap chain …) extracts the real resolve-refrun:from every reusable that uses the bootstrap composite. It runs that bash against a consumer wrapper for six pin shapes and feeds the result to the real script, with both arms stubbed to succeed if reached. It grades 16 files: 8.forgejoand 8.gitea. A second, text-based discovery must find the same set, and each provider must contribute at least one file.v0.63.1)v0.63.1main(main)mainv0.63.1)main)main)v0.63.1)v0.63.1Mutation check (AGENTS.md §8 Axis B). Each mutant ran on a throwaway copy, and its diff was confirmed non-empty:
feature/861test, boundary test.giteatwin loses its SHA armRT_REF#1514 acceptance criteria
bootstrap-rt.sh, graded by the composition test across 16 filesfeature/861test, now also asserting it does not get the SHA messagerefdescriptionaction.yml:8-12@<40-hex>resolution before a doc claims SHA pins workchangelog.d/1514-sha-pin-bootstrap-refusal.fixed.mdReview request
@alex, please verify at source (AGENTS.md §6). Both halves need checking:
bats tests/bootstrap-rt.batson the head, and read the refusal text a SHA-pinned adopter would see, including whether the remedy is enough on its own.docs/SECURITY.mdagainst the script and decide whether the narrowed claims at lines 35–37, 43 and 72–82 say exactly what ships. In particular, does anything still imply that a SHA pin works?Pin your review to the head with
rt review-submit-check --owner frankenbit --repo release-toolkit --pr 1515 --reviewed-head <full sha>(§6.2).🤖 Generated with Claude Code
Landing identity record
0156d84fe764db2a0b02bae6da91af22b11ecf140156d84fe764db2a0b02bae6da91af22b11ecf14This is a post-merge identity record. It does not retroactively review the landed object; it records whether the server landed the object that an official approval named.
bootstrap rtin 16 of 18 reusable files; resolve-ref emits the SHA and bootstrap-rt.sh has no arm for it #1514bootstrap rtin 16 of 18 reusable files; resolve-ref emits the SHA and bootstrap-rt.sh has no arm for it #1514