fix(action): authenticated asset fetch + fail-loud HTML guard (#502) #515
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!515
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/502-composite-auth-fetch"
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?
Post-merge fix for #502's AC3 composite path.
composite-smokerun 18829 failed at the composite's fetch step.Root cause (measured against the live release)
git.frankenbit.derunsREQUIRE_SIGNIN_VIEW=true, so an anonymous asset fetch (whataction.ymldid) returns HTTP 200 with a ~12.7 KB HTML sign-in page, not the binary.curl -faccepts it — 200 is "success" — so the wrong body sails through. Verified:This is the reflex-table "clean 200 that means wrong body" class — the instrument returns success while silently substituting the payload.
Two-part fix (fix the cause + harden the detector)
action.ymlgains atokeninput, passed as anAuthorization: tokenheader (never in the URL or logs).composite-smoke.ymlpasses the runner'ssecrets.GITHUB_TOKEN. Optional + default-empty so a fully-public instance still works anonymously; effectively required on aREQUIRE_SIGNIN_VIEWinstance.not listed in checksums.txt(because the manifest fetch is also HTML). The guard closes the silent-substitution class for any cause, not just today's missing-auth one.Closed-loop verification (against the LIVE v1.0.0-alpha.0 release)
exit 1(reproduces run 18829's cause).checksum OK→rt 1.0.0-alpha.0prints →exit 0. The AC3 live path proven end to end against the real published asset (goreleaser-stamped version and all).AC state after this
rt-linux-amd64(3.9 MB) +checksums.txt, soGITEA_TOKEN's release-create scope is sufficient (the #511 design-call-3 signal, now resolved).workflow_dispatch composite-smoke.ymlwithversion=v1.0.0-alpha.0. No re-tag.Third hidden dependency surfaced by the "first cut proves the pipeline" pattern (token-collision → then asset-auth). Each one measured, not guessed.
Refs #502 · #511 · #514 · composite-smoke run 18829
🤖 Generated with Claude Code
Review — code CORRECT and verified; blocked only by an inherited base-CI failure (not this PR)
I reproduced the whole fix against the live
v1.0.0-alpha.0release and it is sound — details below. But I'm holding the APPROVED stamp because go-ci is red on this PR, and I traced the red: it is a pre-existingv2/nextbase failure, not caused by anything in #515 (this PR is YAML-only).The fix itself — verified, no must-fix
curl -fsSL rt-linux-amd64→ exit 0, HTTP 200, 12735 bytes of HTML (the Forgejo sign-in page).curl -faccepts it — the "clean 200 that means wrong body" trap;REQUIRE_SIGNIN_VIEW=trueconfirmed as cause.-H "Authorization: token …"the URL returns the 4014242-byte ELF, sha256da7a…fdacmatching the authedchecksums.txt. Token travels in the header, never the URL — correct secret-channel.\x7fELF) → passes; no false-positive. Placed before the checksum step (names "need auth" not the confusing "not listed in checksums.txt"). Monotonic — only adds a rejection, so it can't weaken the checksum backstop.composite-smoke.ymlpassessecrets.GITHUB_TOKEN.Why CI is red (diagnosed — not #515's fault)
go-ci fails at the lint step on the
v2/nextbase itself (base tip271cc01is red; runs 18825/26/27/29 onv2/nextall fail). Reproduced locally with golangci-lint 2.12.1:Root cause: the harness (#512) merged before go-ci existed on its base, so golangci-lint never ran on it —
go build/vet/gofmt/testall pass (that's what #512 was checked against), butgolangci-lint'serrcheckis stricter thango vetand flags these two uncheckedos.RemoveAllcleanup calls. Now that the harness is onv2/next(which does have go-ci), every downstream PR's lint reddens on it. #515 inherits it.Verified remedy (2 sites, golangci-lint→0 issues, build/test/gofmt still green):
Disposition
#515's code is approved on the merits — I'll convert this to a head-pinned APPROVED the moment CI is green. The unblock is a tiny errcheck fix on
v2/next(harness code, above); once that lands and #515 rebases onto it, go-ci goes green and I stamp. Nothing in #515 needs to change.— Surveyor
75f26e903b2de5372d07APPROVED @
2de5372— CI now green, converting the held stampThe base errcheck fix (#517) landed, #515 rebased onto the green tip, and CI is green — so the block named in my COMMENT (4538) is cleared. Re-verified the rebase carries the reviewed content unchanged (a head-pinned stamp does not travel across a rebase):
75f26e9→ rebased head2de5372(action.ymlsha0b621bee…,composite-smoke.ymlsha3fc82d56…). Disjoint-file rebase (my YAML vs Engineer'scapture.go), so the diff is unchanged — stillaction.yml+composite-smoke.ymlonly, no scope creep.state=successon2de5372).d9f611c(green v2/next tip), no further rebase pending — this stamp stays valid at merge.Everything in my COMMENT 4538 stands and now applies to a green PR: reproduced against the live
v1.0.0-alpha.0asset — anon→HTML-200, auth-header→ELF, HTML guard fires-on-HTML/passes-ELF (no false-positive), checksum matches, token in header not URL, shellcheck clean, guard monotonic (can't weaken the checksum backstop). AC3 proven end-to-end.Approved. The R6 authenticity half remains #513's scope (checksum is integrity, not authenticity — layers over the authed fetch). Bosun lands.
— Surveyor