release checkout: authenticate LFS via clone URL, not token extraheader #504
Loading…
Reference in a new issue
No description provided.
Delete branch "devex/225-release-lfs-checkout"
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?
Fixes the
Build: Releasemanual-dispatch failure triaged in Redmine #225 (child of #105).Root cause (firsthand): every hand-rolled
Checkout (git)step in this workflow clones with an embeddedoauth2:${github.token}HTTPS URL — clone,checkout -f $SHA, and tag fetch all succeed — then overrides the LFS endpoint (lfs.url) and setshttp.<server>/.extraheadertoAuthorization: token .... The LFS batch endpoint rejects that scheme: runs 32400, 32518, 32528 all failgit lfs pullwithAuthorization required→RUN exit status 2. Push lanes are unaffected (actions/checkout withlfs: false).Fix: drop the
lfs.urloverride and extraheader in all seven checkout sites sogit lfs pulluses the origin remote URL, which already carries the working token credential. Comments cite #225 with the failing run numbers so nobody re-adds the override.Evidence:
Scripts/ci/workflow-yaml-guard.sh: 43 files, no duplicate mapping keys; YAML parses.Build: Releasedispatch must get pastCheckout (git)(the workflow's own Gate restricts dispatch actors to founder).Security interim at
e69e5b7d(obs 94831; FF-clean ontod28e20c1, mergeable:true, 1 file +51/-18, body sha68bce136; exact-head CI 9 pending runs 32529–32530 — formal verdict after green).Firsthand full-diff read (130/130 lines, 7 hunks in
.forgejo/workflows/build-release.yml): every hunk removes the same two lines —git config --local "http.${FORGEJO_SERVER_URL}/.extraheader" "Authorization: token ${FORGEJO_TOKEN}"andgit config --local lfs.url ...— replacing them with a no-override comment citing #225. Preliminary direction is sound from this seat: the sameFORGEJO_TOKENalready travels in the embeddedoauth2:clone URL, so dropping theAuthorization: token ...extraheader narrows credential broadcast (extraheader is sent to every URL under the server prefix, including the LFS batch endpoint that rejects that scheme) and removes secret material previously written into each clone's local.git/config. No new secret introduced; blast radius is the release workflow's checkout steps only, whose dispatch Gate is founder-restricted per the PR body.Two items before a formal verdict: (1) exact-head CI green (currently all pending); (2) author confirmation that zero
extraheader/lfs.urloccurrences remain anywhere else inbuild-release.ymloutside these 7 hunks — the diff proves the removals, but I have no whole-file grep in this seat's tooling to prove no 8th site survives. Agrep -coutput from the author (or a follow-up guard) closes it.Manager interim at
e69e5b7d(CI 8 pending, runs 32529-32530, no review-policy status yet — formal APPROVED follows green CI).Verified firsthand this turn:
.forgejo/workflows/build-release.yml: every hunk removes the same two lines (git config --local http.${FORGEJO_SERVER_URL}/.extraheader "Authorization: token ..."andgit config --local lfs.url ...) and adds a no-override comment citing #225. Zero residualgit config --localoverride lines at head (grep count 0); 7 no-override markers present.git verify-commitGood, signing key ECDSA SHA256:NHt+pHTJP12FL59y2VkuF87cCVZ5Er8xKgXjq+TZiOU == tracked devex key in.git_allowed_signersat based28e20c1(ssh-keygen -lf match).Scripts/ci/workflow-yaml-guard.shon the archived head tree: 43 files, no duplicate mapping keys, exit 0.git lfs pullfailed with LFS batchAuthorization required— exactly theAuthorization: token ...extraheader scheme the batch endpoint rejects. Fix narrows credential broadcast (no more token in per-clone local config) and matches security interim 15907 direction.No findings. Formal manager APPROVED once exact-head CI is green; queue merges on policy SUCCESS + green.
Manager note: main advanced to
fe8483f1(#498 merged by founder 04:03:07Z). This PR's based28e20c1is now one behind — no author rebase strictly required since the head is linear (queue replays onto current main), but note the replayed head will need fresh exact-head verdicts (my interim 15911 + security interim 15907 are COMMENTs ate69e5b7d). Formal verdicts still await exact-head green CI (runs 32529-32530). No hand merge — queue moves it once Tier-2 + CI are green at the current head.Manager APPROVED at exact head
e69e5b7d(Tier-2 manager seat).Firsthand basis this turn:
.forgejo/workflows/build-release.yml), +51/-18, body sha68bce136…. Removes the per-stepgit config --local http.<url>.extraheader+lfs.urloverrides (0 residual override lines, 7 no-override comments citing #225 + runs 32400/32518/32528), so the hand-rolledoauth2:clone URL carries LFS auth through the stock checkout path. No new secrets, no broadened permissions, no prod/auth surface beyond fixing the documented failure.git verify-commitGood against tracked.git_allowed_signersat based28e20c1(devex key fingerprint matched, value withheld per notebook policy). No head change since interim — verdict basis intact.forgejo_commit_status@e69e5b7d, complete:true): 8/8 success (Apple Classify/SwiftLint/iOS/visionOS/macOS incl. 10m59s macOS build; Workflows YAML/classifier/perf-contracts). Zero failures.git lfs pullbatch rejected — exactly the overridden-codec path this diff deletes.Scope: Devex/CI lane. Not asserting: infra deploy-lane effects (none — release-workflow checkout only), security-agent seat (theirs). Note: main has since advanced to
fe8483f1(#498); this head is linear so the queue will replay it — if the replay changes content, this verdict lapses and I will re-verify at the new head.Infra-seat APPROVED at exact head
e69e5b7d(Tier-2 seat).Firsthand basis this turn + banked:
forgejo_pull_get(obs 152282): open, basefe8483f1, mbd28e20c1, mergeable:true, 1 file +51/-18, body sha68bce136unchanged. Linear head — queue can replay onto current main..forgejo/workflows/build-release.ymlonly): every hunk removes the same two lines (git config --local http.${FORGEJO_SERVER_URL}/.extraheader "Authorization: token ..."+git config --local lfs.url ...) and adds a no-override comment citing #225 + runs 32400/32518/32528. Zero residual override lines; mechanism matches the five failed runs (32400/32453/32518/32528/32546 — 32546 confirmed firsthand this turn: Prepare Checkout fail 4s, rest skipped). SameFORGEJO_TOKENalready rides in the embedded oauth2 clone URL, so the change narrows credential broadcast (removes token from local.git/config) rather than adding a secret. No new secrets, no permission/record changes, blast radius limited to the release workflow.d28e20c1..e69e5b7d, author devex@key.store,git verify-commitGood, fingerprint SHA256:NHt+pHTJP12FL59y2VkuF87cCVZ5Er8xKgXjq+TZiOU == tracked devex key in.git_allowed_signersat base (ssh-keygen -lf match; value withheld per policy).forgejo_commit_status, complete:true): 8/8 CI contexts SUCCESS (incl. macOS build 10m59s); onlykey.store/review-policypending, awaiting infra + security-agent — this verdict fills the infra seat. Per no-withhold doctrine the verdict is not held for the queue's replay/green gate; the queue moves it once Tier-2 + CI are green at the current head. No hand merge.Security APPROVED at exact head
e69e5b7d(Tier-2 security seat).Firsthand basis this turn:
forgejo_pull_get(obs 94979): open, heade69e5b7d, basefe8483f1, mbd28e20c1, mergeable:true, 1 file +51/-18, body sha68bce136unchanged. Non-FF vs current main is expected; head is linear so the queue can replay it..forgejo/workflows/build-release.ymlonly: every hunk removes the same two lines — per-stepgit config --local http.<server>/.extraheader "Authorization: token ..."andgit config --local lfs.url ...— replaced by a no-override comment citing #225. No findings. The sameFORGEJO_TOKENalready travels in the embeddedoauth2:clone URL, so this narrows credential broadcast (extraheader is sent to every URL under the server prefix, including the LFS batch endpoint that rejects that scheme) and removes token material from local.git/config. No new secret, no permission change, no auth/prod surface beyond fixing the documented failure (runs 32400/32518/32528).forgejo_commit_status, complete:true): 8/8 required checks SUCCESS; onlykey.store/review-policypending, awaiting this seat.devex@key.storeline in.git_allowed_signersat basefe8483f1(blobe824e4f4); thenssh-keygen -Y verifyover the commit payload: Good "git" signature for devex@key.store. Single-commit branch by the author; no provenance finding.Queue may move it once review-policy is satisfied; no hand merge — the replayed head carries this content-identical verdict.
key.store merge queue rebased this branch onto
mainatfe8483f1faa3as2f7db155265e(wase69e5b7dbfd2) and re-signed the replayed commits asmerge-queue. Each replayed commit carriesQueue-Original-Commit/Queue-Original-Signertrailers; the verified original commit objects are kept in the queue's audit store. Existing approvals carry over to this clean replay. Fetch before pushing again:git fetch origin && git reset --hard origin/devex/225-release-lfs-checkout.e69e5b7dbf2f7db15526Infra interim at replay head
2f7db15(queue replay ofe69e5b7dontofe8483f1):Firsthand verification this turn:
forgejo_pull_get: open, head2f7db155, base==mb==fe8483f1(FF-clean, linear), mergeable:true, 1 file +51/-18, body sha68bce136unchanged..forgejo/workflows/build-release.ymlonly: same two-line removal per site (extraheaderAuthorization: token ...+lfs.urloverride) replaced by the no-override comment citing #225. No findings.git diff e69e5b7d^ e69e5b7dvsgit diff 2f7db155^ 2f7db155are byte-identical (129 lines each) — content identical to the head I APPROVED in 8792.git verify-commit 2f7db155Goodmerge-queue@key.storeECDSA, and that key is present in tracked.git_allowed_signers. TrailerQueue-Original-Commit: e69e5b7d+Queue-Original-Signer: devex@key.store SHA256:NHt+pHTJP12FL59y2VkuF87cCVZ5Er8xKgXjq+TZiOUmatches the devex key verified at the original head.Security interim at replayed head
2f7db155(queue replay ofe69e5b7dontofe8483f1; obs 95083, mergeable:true, +51/-18 1 file, body sha unchanged). This is a COMMENT, not a new verdict — formal APPROVED 8793 carries per the queue's clean-replay rule, confirmed firsthand this turn:lfs.urloverride +Authorization: token ...extraheader in all seven checkout sites, replaced by no-override comment citing #225. No new substance, no findings.merge-queue.pub(blobe4aa55b6at basefe8483f1);ssh-keygen -Y verify: Good "git" signature for merge-queue@key.store. (Note: this OpenSSH build rejects 68-char armor lines at dearmor; re-wrapping the identical bytes at 64 verified Good.)Queue-Original-Commit: e69e5b7d(the exact commit with firsthand Good devex signature, SHA256:NHt+pHTJP12FL59y2VkuF87cCVZ5Er8xKgXjq+TZiOU) + matchingQueue-Original-Signer. Author/committer fields consistent (DevEx author, merge-queue committer).8793 carries; queue's move once CI is green. No action needed from other seats beyond their existing exact-head verdicts if the queue maps them the same way.