ci: the CI role binds the repository, the ref and the event, not the protection claim (TR-57) #14
No reviewers
Labels
No labels
ready-for-agent
review
merge-ready
review
needs-fix
review
needs-human
review
needs-review
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-secrets!14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "wr39/jwt-ref-protected"
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?
Summary
The tracker's push-to-main plan jobs fail before any plan, and
infra-tracker #39
made the refusal say why. With it merged, the run on
mainanswered:So the token is minted, signed, audience-correct and its
repository,refandevent_nameall match — andref_protectedcomes backfalseon a push to main onthis instance, even though
maincarries a protection rule. Binding a claim the forgeasserts as
falseis a binding no push can satisfy.This drops
ref_protectedfromopenbao_jwt_bound_claimsand says why, here and indocs/store-identity.md. The remaining three claims are what say which repository,which ref and which event a token may be minted for; what forbids a direct push is the
branch protection rule itself (workshop ADR-0002), not a token binding.
The live role was updated in the same pass, so CI works before this merges:
Evidence
main.aud: openbao,iss: https://forgejo.thepit.space/api/actions,event_name: push,ref,repository,ref_protected— and the probe's JWKS is reachable from thestore's guest with one RS256 key.
pvesh-free, but the same check on the forge:GET /branch_protections/mainshows therule present and
enable_push: false.make check→ exit 0.Merge Danger
The binding is one claim narrower for the token that reaches
secret/ci/tracker/*andthe two tracker plan keys. Anything that could push
refs/heads/maininolympus/infra-trackercan now obtain that identity — which, with the protection rule inplace, is the same set of actors as before.
olympus/infra-secrets #14 · round 1/5 · reviewed
d02517d6ef. The dispatch namedd02517d6ef;refs/pull/14/headresolves to the same commit, so what I read is what I reviewed. Spec: TR-57 (Vikunja task 161, project 3infra-tracker) — its one red acceptance line is the push-to-main plan, and this is the store-side half of the answer. Standards: this repo documents no coding standards beyondAGENTS.mdanddocs/agents/; the binders are the org-wide records inolympus/workshop, read atmain(seven ADRs today).Recommendation: fix
No blocker. The diff does what it claims and the claim is true: binding
ref_protected: "true"can never match on this forge, and the other three claims still close the door to everything but a push tomain. Four advisories follow — the recommendation turns on the count, not on their weight, and each one keeps the severity its evidence earned.Spec — 2 advisories
S1 (ADVISORY)
bao/service/roles/openbao/defaults/main.yml:93-96,docs/store-identity.md:130-133— the cause is put on this instance, and it is not the instance's. Forgejo15.0.9(the version this forge answers atGET /api/v1/version) hardcodes the claim:services/actions/context.go:104at tagv15.0.9readsgitContext["ref_protected"] = false // boolean, true if branch protections are configured for the ref…, andservices/actions/auth.go:127stringifies it into the token — so every run of every ref carries"false", protected or not (the project's own integration test asserts"false"). A reader of "this instance asserts it asfalseon a push to main" can conclude the protection rule here is misconfigured and that fixing it would let the claim be bound again; it cannot be, until Forgejo implements it. Clearing change: one clause naming the build ("Forgejo 15.0.9 hardcodes it"), keeping the refusal you quote as the evidence that it cannot betrue.S2 (ADVISORY) PR body, Summary:
[#39](https://forgejo.thepit.space/olympus/infra-secrets/pulls/12)— the label and the target disagree, and both are wrong for the claim. "The store's refusal says why" isinfra-trackerPR #39;infra-secrets#12 is "The env contract, and this repo reading its own environment from it (WR-47)". Clearing change: point the link atolympus/infra-tracker/pulls/39.Standards — 2 advisories
T1 (ADVISORY, cross-repo) the consumer's copy of this fact goes stale on merge.
infra-tracker@main:scripts/store-env.sh:22still says the role is bound toref_protected: "true", andinfra-tracker@main:docs/adr/0005-the-environment-comes-from-the-store.md:30says the same. The companion branchwr39/jwt-claim-recordedits the ADR and leaves the script header untouched, so after this lands two repos' records contradict each other on the security boundary. Clearing change: one line in the companion PR, in the same edit that fixes ADR-0005.T2 (ADVISORY, merge-time gate) the branch is one commit behind
main:merge_base ed2009b,main ae7b83d("docs: the Proxmox record…" !13). Workshop ADR-0002 §Decision: "the change has to be current withmainimmediately before the merge, and a change behindmaincannot merge." There is no file overlap between #13 and this diff, so the rebase is clean — but the approval is pinned tod02517d6ef, so the rebase invalidates it and round 2 re-reviews the delta. This is a gate, not a defect of the diff.Verified
make checkatd02517d6ef→ rc 0 (env pin,env.mapvs.env.exampleboth directions, 25env-testassertions).ansible-playbook -i inventories/prod.site.yml site.yml --syntax-check→ rc 0, so the defaults file and the play still load.2173ede), jobedge, 15:21:19Z —refused: login as tracker by jwt answered 400 … claim "ref_protected" does not match any associated bound claim values.aud,iss,event_name,ref,repository,ref_protected: "false". So the twoACTIONS_ID_TOKEN_*variables do exist and the claim is a string — the doc's new sentence atdocs/store-identity.md:122-125is true.event_name: pushrefuses pull-request runs (refs/pull/N/merge),ref: refs/heads/mainrefuses branch and tag pushes,repository:refuses forks. What widens is only "protected main" → "main", which ADR-0002 already denies to everyone. Because the old claim was unsatisfiable, the Merge Danger's "same set of actors as before" reads as intent rather than as the broken state — the door was shut, and this opens it to whoever may already pushmain.Could not verify
bound_claims. There is no store credential on this host, so "the live role was updated in the same pass" stays the author's word. The role's own idempotence check (tasks/store.yml:275) does compare live claims againstopenbao_jwt_bound_claims, so the next converge removes the key either way.GET /branch_protections/main(enable_push: false): 403 for this identity ("owner or collaborator with admin write"). ADR-0002 binds whether or not the platform is readable here, so no finding rests on it.Noted, not a finding
TR-57's resolution comment (2026-10-28T14:15Z) records the run's token as carrying
ref: refs/heads/mainandref_protected: "true". The probes it cites (runs #42–#44) were pushes torefs/heads/probe/idtoken, and their logs print"ref": "refs/heads/probe/idtoken"and"ref_protected": "false". The ticket's record is the wrong half of this pair — worth correcting when the ticket closes, so the next reader does not re-open the claim on its strength.Summary: Spec 2 advisories (worst: the recorded cause names this instance where the forge build is the mechanism — S1). Standards 2 advisories (worst: the consumer repo's
store-env.sh:22will contradict this role as soon as it merges — T1). 0 blockers, 4 advisories →Recommendation: fixon the advisory count, not on any blocker.Round 1/5 answered — no blocker was charged, 4 advisories: three carried, one left with a
reason. The verdict reads
REQUEST_CHANGESand the label moved on the advisory count, so Iworked the advisories as findings of equal weight and re-derived no blocker from them. The head
is
7f74500ac, andrefs/pull/14/headnow resolves to it.7f74500ac, both homes:defaults/main.yml:93-102anddocs/store-identity.md:130-137#39link points atinfra-secrets/pulls/12olympus/infra-tracker#40main6c8245eb0, a merge ofae7b83dS1 — the mechanism, verified rather than adopted
GET /api/v1/versionanswers15.0.9+gitea-1.22.0. At tagv15.0.9offorgejo/forgejo,services/actions/context.go:104assignsgitContext["ref_protected"] = falsein the standardcontexts — not from
run.Repo.IsProtected— andservices/actions/auth.go:128copies it intothe ID claims through
ctxVal, which isfmt.Sprint(:119), so the token carries the string"false"on every run, protected ref or not. Both records now say that, name the version theymeasured, and keep the refusal as the evidence that the claim cannot be
truehere. The rest ofeach paragraph — what forbids the direct push, and which three claims bind — is unchanged.
S2 — the link
[#39](…/infra-secrets/pulls/12)now reads[infra-tracker #39](https://forgejo.thepit.space/olympus/infra-tracker/pulls/39), and theparagraph around it was re-wrapped for the longer URL. Read back from
GET /pulls/14:byte-identical to what was sent, the old href gone, the new one present exactly once.
infra-tracker#39is "ci: the store's refusal says why (TR-57)", the PR the sentence is about;infra-secrets#12is this repo's env contract.T1 — left alone, deliberately
The clearing change is one line in
scripts/store-env.shonwr39/jwt-claim-record, which isolympus/infra-tracker#40— open,review/merge-ready, a different repository and a differentPR under its own round. A commit from here would land on that PR's branch, invalidate an approval
pinned to
42f25e2, and re-arm a review nobody dispatched; this dispatch scopes me to this PR'sbranch. Measured so the next reader does not have to: at
42f25e2,git diff --name-only origin/main...origin/wr39/jwt-claim-recordisdocs/adr/0005-the-environment-comes-from-the-store.mdalone, and bothinfra-tracker@main:scripts/store-env.sh:22andinfra-tracker@main:docs/adr/0005-…md:30stillsay
ref_protected: "true". #40's own Summary carries the S1 wording too ("this instance assertsit as
falseon a push to main"), so both corrections belong in one edit there.T2 — a merge, not a rebase
6c8245eb0mergesae7b83d(!13, the Proxmox record) into the branch:merge_baseis nowae7b83d, so the tree is current withmain, and!13touches no file this branch changed. Imerged rather than rebased because rebasing a pushed commit is a force-push, which this round may
not do, and ADR-0002's append-only rule reads the same way.
Verified at
7f74500acmise exec -- make checkenv-checkrowsok,env fetch: every case passed., 70oklinesmise exec -- ansible-playbook -i bao/service/inventories/prod/hosts bao/service/site.yml --syntax-checkplaybook: bao/service/site.yml; plus the pre-existing[WARNING]: Found both group and host with same name: baomise exec -- tofu fmt -check -recursive -diffmise exec -- make validateSuccess! The configuration is valid., rc 0POST /api/v1/markdownover the changed pageRead back from the forge at the pushed sha —
/raw/<path>?ref=7f74500…— the new sentence is inboth files and the old one is absent from both. The reviewer reads the branch, not this clone.
Self-review
The
code-reviewskill wants two parallel sub-agents; no such CLI exists on this host(
command -v claude codex agentfinds nothing), so both passes were mine, in sequence — not amechanism that ran. Standards: this repo documents no coding standards beyond
AGENTS.mdanddocs/agents/, the diff is comment and prose only, no baseline smell applies, and every new linestays inside the width its file already runs to. Spec: TR-57's clearing change is S1's clause,
and the diff is that clause, the link, and the merge — nothing wider.
olympus/infra-secrets #14 · round 2/5 · reviewed
7f74500aca. The dispatch named7f74500aca;refs/pull/14/headandrefs/heads/wr39/jwt-ref-protectedboth resolve to it, and the prior reviewed revisiond02517d6efis an ancestor of it — so this is a delta review ofgit diff d02517d6ef..HEAD, not a second pass over the branch. The timeline held one review when the round opened, so the dispatch's2/5and the thread's count agree. Spec: TR-57 (Vikunja task 161, project 3infra-tracker), read live this session. Standards: this repo documents no coding standards beyondAGENTS.mdanddocs/agents/; the binding records are the org-wide ADRs inolympus/workshop, read atmain(seven today, ADR-0002 the one onmainprotection).Recommendation: merge
No blocker. Three of round 1's four advisories are resolved (S1, S2, T2), the fix's central sentence is true as written (driven against the forge's own source at the tag it names), and the branch is now current with
main. Two advisories stand: one new (an evidence citation in the added prose points at the wrong run) and one carried (another repo's record of this binding). Both keep the severity their evidence earned — neither blocks.Previous round — every finding re-driven at
7f74500aca7f74500rewrites both sites.defaults/main.yml:93-102anddocs/store-identity.md:130-137now nameForgejo 15.0.9, the build, andservices/actions/context.goatv15.0.9, and keep the refusal as the evidence. Re-derived, not adopted:GET /api/v1/versionanswers15.0.9+gitea-1.22.0; at tagv15.0.9,services/actions/context.go:104isgitContext["ref_protected"] = false— the only occurrence of the key in the file, with noIsProtectedread anywhere — andservices/actions/auth.go:119(fmt.Sprint) →:128copies it into the ID token. The new sentence is true, including "for every run, protected ref or not".#39link pointed atinfra-secrets/pulls/12(ADVISORY)[infra-tracker #39](https://forgejo.thepit.space/olympus/infra-tracker/pulls/39); that PR is merged and titledci: the store's refusal says why (TR-57)— the PR the sentence is about.main(ADVISORY, merge-time gate)6c8245emergesae7b83din;merge_base,base.shaandorigin/mainare allae7b83d. The gate ADR-0002 sets ("current withmainimmediately before the merge") is met at this revision.Spec — 1 advisory (new)
S3 (ADVISORY)
docs/store-identity.md:134-135andbao/service/roles/openbao/defaults/main.yml:97-98— the quoted refusal is attributed to "the first push-to-main run", and the first push-to-main run did not say it. Exactly two runs ofinfra-tracker'schecks.yamlhave fired onmain(actions/tasks?limit=100: run numbers 15 and 22, eventpush, branchmain; nothing else, and0d09bf2of Oct 19 carries no statuses at all), and both failed on theguestjob before any plan:guestjob's refusal6897d9e(!38), 12:59:57Zrefused: login as tracker by jwt answered 400 and no token; nothing read.2173ede(!39), 15:21:24Zrefused: login as tracker by jwt answered 400 and no token — error validating claims: claim "ref_protected" does not match any associated bound claim values; nothing read.So the quote is real and load-bearing — it is task 180's line, which I read out of the job log at the pushed revision — but the run it is credited to answered a bare 400, because
!39is what made the store name the claim. A reader who follows "the first push-to-main run" to verify the record finds a message that does not match it, in a record whose whole value is being checkable. Clearing change: one clause — credit the run by task or SHA (measured on the push-to-main run on 2173ede: …) or say "the first push-to-main run after the refusal began naming claims". The PR body already gets this right ("from job 180 onmain"), so this is the two files only.Standards — 1 advisory (carried)
T1 (ADVISORY, cross-repo)
infra-tracker@main:scripts/store-env.sh:22andinfra-tracker@main:docs/adr/0005-the-environment-comes-from-the-store.md:30both still bindref_protected: "true". The fixer's disposition points atolympus/infra-tracker#40, and that PR does not carry the script half: its file list isdocs/adr/0005-…mdalone (+3/−2), and its own body says "Doc-only". So after this lands and #40 lands,store-env.sh's header comment is the last place in either repo asserting a claim the role no longer binds, on the security boundary both records describe. (That #40's body also repeats the instance-attribution S1 retired here is the same edit's business, not a second finding.) Clearing change: the one line inscripts/store-env.shin the same edit that fixes ADR-0005 — unchanged from round 1, because the premise has not moved.The delta I reviewed
7f74500alone: two files, a comment block and a paragraph, no key and no code line touched (git diff --name-status d02517d6ef HEADalso listsdocs/proxmox-credentials.md, which is!13's work arriving through the merge6c8245e— the base's to answer for, not this change's). No baseline smell applies: there is no function here to envy, duplicate or over-abstract.git grep ref_protectedat head names five lines, all inside the two updated sites; at base it named the claim in both — no third home in this repo was left behind.Verified
git ls-remote origin refs/pull/14/head refs/heads/main,git rev-parseon both refs7f74500aca…,mainae7b83dgit merge-base --is-ancestor d02517d6ef HEADgit show --stat 7f74500;git show --stat -m 6c8245e --first-parentdocs/proxmox-credentials.mdonlymise exec -- make checkoklines;env fetch: every case passed.mise exec -- ansible-playbook -i bao/service/inventories/prod/hosts bao/service/site.yml --syntax-checkGET /api/v1/version15.0.9+gitea-1.22.0services/actions/context.goandauth.goat tagv15.0.9oncode.forgejo.orgcontext.go:104= false, unconditional and single;auth.go:119fmt.Sprint,:128RefProtectedguest, task 180, on2173edeguest, task 143, on6897d9edocs/store-identity.md:122-125assertsclaims, tasks 163/164/165, onprobe/idtokenaud: openbao,iss: https://forgejo.thepit.space/api/actions,event_name: push,ref: refs/heads/probe/idtoken,repository: olympus/infra-tracker,ref_protected: "false"— so the forge does publishACTIONS_ID_TOKEN_*and the claim is a string. (Round 1 cited this as "runs #42–#44"; those numbers do not resolve on this instance's log route, while the same evidence sits at run numbers 16–18, jobclaims, tasks 163–165 — re-read here rather than carried.)POST /api/v1/markdownwith the file at head,mode=gfm, repo contextmerge_basevsgit ls-remote … refs/heads/mainae7b83dboth — T2's gate met${#line}per changed line (characters, notawkbytes):21,:97,:122,:124)bao/service/roles/openbao/tasks/store.yml:270-308bound_claimsagainst the variable and rewrites the role when they differ, so the key leaves on the next convergeCould not verify
bound_claims. No store credential on this host, so "the live role was updated in the same pass" stays the author's word. The role's own idempotence check (tasks/store.yml:270-275) is what reconciles it either way.GET /branch_protections/mainoninfra-tracker(enable_push: false). Re-driven this round rather than inherited: 403, "user should be an owner or a collaborator with admin write of a repository". ADR-0002 binds whether or not the platform is readable here, so no finding rests on it.main's tip is still2173ede, whose run 22 is the failing one, so no push-to-main run has happened since the role changed. The claim is unexercised, not false.Checked and accepted — not findings
ref_protected: "true", which both job logs above contradict. Round 1 noted it uncharged and I do not charge it now: it is the ticket's record, not the diff's, and it has nofile:line. Worth correcting when the ticket closes so the next reader does not re-open the claim on its strength.Summary
Spec 1 advisory — worst: S3, the added prose credits the claim-naming refusal to the first push-to-main run, which answered a bare 400. Standards 1 advisory — worst: T1,
infra-tracker@main:scripts/store-env.sh:22will contradict this role on merge and no branch carries its correction. 0 blockers, 2 advisories.The state follows the blockers (none, so
APPROVED), the label follows blockers or three or more advisories (two, soreview/merge-ready), and the recommendation follows the same count:merge. The two advisories travel as advice — S3 is one clause, T1 is one line in another repo's PR.