ci: the CI role binds the repository, the ref and the event, not the protection claim (TR-57) #14

Merged
pit merged 3 commits from wr39/jwt-ref-protected into main 2026-10-28 21:33:35 +00:00
Owner

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 main answered:

refused: 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 token is minted, signed, audience-correct and its repository, ref and
event_name all match — and ref_protected comes back false on a push to main on
this instance, even though main carries a protection rule. Binding a claim the forge
asserts as false is a binding no push can satisfy.

This drops ref_protected from openbao_jwt_bound_claims and says why, here and in
docs/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:

bound_claims   map[event_name:push ref:refs/heads/main repository:olympus/infra-tracker]

Evidence

  • The refusal above, from job 180 on main.
  • A live run's token claims, read out of the job (a probe on a scratch branch):
    aud: openbao, iss: https://forgejo.thepit.space/api/actions, event_name: push,
    ref, repository, ref_protected — and the probe's JWKS is reachable from the
    store's guest with one RS256 key.
  • pvesh-free, but the same check on the forge: GET /branch_protections/main shows the
    rule 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/* and
the two tracker plan keys. Anything that could push refs/heads/main in
olympus/infra-tracker can now obtain that identity — which, with the protection rule in
place, is the same set of actors as before.

## Summary The tracker's push-to-main plan jobs fail before any plan, and [infra-tracker #39](https://forgejo.thepit.space/olympus/infra-tracker/pulls/39) made the refusal say why. With it merged, the run on `main` answered: ``` refused: 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 token is minted, signed, audience-correct and its `repository`, `ref` and `event_name` all match — and `ref_protected` comes back `false` on a push to main on this instance, even though `main` carries a protection rule. Binding a claim the forge asserts as `false` is a binding no push can satisfy. This drops `ref_protected` from `openbao_jwt_bound_claims` and says why, here and in `docs/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: ``` bound_claims map[event_name:push ref:refs/heads/main repository:olympus/infra-tracker] ``` ## Evidence - The refusal above, from job 180 on `main`. - A live run's token claims, read out of the job (a probe on a scratch branch): `aud: openbao`, `iss: https://forgejo.thepit.space/api/actions`, `event_name: push`, `ref`, `repository`, `ref_protected` — and the probe's JWKS is reachable from the store's guest with one RS256 key. - `pvesh`-free, but the same check on the forge: `GET /branch_protections/main` shows the rule 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/*` and the two tracker plan keys. Anything that could push `refs/heads/main` in `olympus/infra-tracker` can now obtain that identity — which, with the protection rule in place, is the same set of actors as before.
bot-minos requested changes 2026-10-28 21:19:45 +00:00
Dismissed
bot-minos left a comment

olympus/infra-secrets #14 · round 1/5 · reviewed d02517d6ef. The dispatch named d02517d6ef; refs/pull/14/head resolves to the same commit, so what I read is what I reviewed. Spec: TR-57 (Vikunja task 161, project 3 infra-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 beyond AGENTS.md and docs/agents/; the binders are the org-wide records in olympus/workshop, read at main (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 to main. 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. Forgejo 15.0.9 (the version this forge answers at GET /api/v1/version) hardcodes the claim: services/actions/context.go:104 at tag v15.0.9 reads gitContext["ref_protected"] = false // boolean, true if branch protections are configured for the ref…, and services/actions/auth.go:127 stringifies 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 as false on 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 be true.

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" is infra-tracker PR #39; infra-secrets #12 is "The env contract, and this repo reading its own environment from it (WR-47)". Clearing change: point the link at olympus/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:22 still says the role is bound to ref_protected: "true", and infra-tracker@main:docs/adr/0005-the-environment-comes-from-the-store.md:30 says the same. The companion branch wr39/jwt-claim-record edits 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 with main immediately before the merge, and a change behind main cannot merge." There is no file overlap between #13 and this diff, so the rebase is clean — but the approval is pinned to d02517d6ef, so the rebase invalidates it and round 2 re-reviews the delta. This is a gate, not a defect of the diff.

Verified

  • make check at d02517d6ef → rc 0 (env pin, env.map vs .env.example both directions, 25 env-test assertions).
  • ansible-playbook -i inventories/prod.site.yml site.yml --syntax-check → rc 0, so the defaults file and the play still load.
  • The refusal the body quotes, reproduced from the job log rather than the prose: run #48 (push, 2173ede), job edge, 15:21:19Z — refused: login as tracker by jwt answered 400 … claim "ref_protected" does not match any associated bound claim values.
  • The claim the docs now assert, reproduced from the probe logs: runs #42/#43/#44 print aud, iss, event_name, ref, repository, ref_protected: "false". So the two ACTIONS_ID_TOKEN_* variables do exist and the claim is a string — the doc's new sentence at docs/store-identity.md:122-125 is true.
  • The security shape after the drop, walked over every event a same-repo actor can raise: event_name: push refuses pull-request runs (refs/pull/N/merge), ref: refs/heads/main refuses 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 push main.

Could not verify

  • The live role's current 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 against openbao_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.
  • End-to-end: no push-to-main run has happened since the refusal, so "CI works before this merges" has not been exercised by a real run.

Noted, not a finding

TR-57's resolution comment (2026-10-28T14:15Z) records the run's token as carrying ref: refs/heads/main and ref_protected: "true". The probes it cites (runs #42–#44) were pushes to refs/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:22 will contradict this role as soon as it merges — T1). 0 blockers, 4 advisories → Recommendation: fix on the advisory count, not on any blocker.

<!-- minos review-loop: repo=olympus/infra-secrets pr=14 head=d02517d6efa910f533eff8c41f21443a423e1f4b round=1/5 axes=standards,spec --> **olympus/infra-secrets #14 · round 1/5 · reviewed `d02517d6ef`.** The dispatch named `d02517d6ef`; `refs/pull/14/head` resolves to the same commit, so what I read is what I reviewed. Spec: TR-57 (Vikunja task 161, project 3 `infra-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 beyond `AGENTS.md` and `docs/agents/`; the binders are the org-wide records in `olympus/workshop`, read at `main` (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 to `main`. 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. Forgejo `15.0.9` (the version this forge answers at `GET /api/v1/version`) hardcodes the claim: `services/actions/context.go:104` at tag `v15.0.9` reads `gitContext["ref_protected"] = false // boolean, true if branch protections are configured for the ref…`, and `services/actions/auth.go:127` stringifies 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 as `false` on 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 be `true`. **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" is `infra-tracker` PR #39; `infra-secrets` #12 is "The env contract, and this repo reading its own environment from it (WR-47)". Clearing change: point the link at `olympus/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:22` still says the role is bound to `ref_protected: "true"`, and `infra-tracker@main:docs/adr/0005-the-environment-comes-from-the-store.md:30` says the same. The companion branch `wr39/jwt-claim-record` edits 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 with `main` immediately before the merge, and a change behind `main` cannot merge." There is no file overlap between #13 and this diff, so the rebase is clean — but the approval is pinned to `d02517d6ef`, so the rebase invalidates it and round 2 re-reviews the delta. This is a gate, not a defect of the diff. ### Verified - `make check` at `d02517d6ef` → rc 0 (env pin, `env.map` vs `.env.example` both directions, 25 `env-test` assertions). - `ansible-playbook -i inventories/prod.site.yml site.yml --syntax-check` → rc 0, so the defaults file and the play still load. - The refusal the body quotes, reproduced from the job log rather than the prose: run #48 (push, `2173ede`), job `edge`, 15:21:19Z — `refused: login as tracker by jwt answered 400 … claim "ref_protected" does not match any associated bound claim values`. - The claim the docs now assert, reproduced from the probe logs: runs #42/#43/#44 print `aud`, `iss`, `event_name`, `ref`, `repository`, `ref_protected: "false"`. So the two `ACTIONS_ID_TOKEN_*` variables do exist and the claim is a string — the doc's new sentence at `docs/store-identity.md:122-125` is true. - The security shape after the drop, walked over every event a same-repo actor can raise: `event_name: push` refuses pull-request runs (`refs/pull/N/merge`), `ref: refs/heads/main` refuses 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 push `main`. ### Could not verify - The live role's current `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 against `openbao_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. - End-to-end: no push-to-main run has happened since the refusal, so "CI works before this merges" has not been exercised by a real run. ### Noted, not a finding TR-57's resolution comment (2026-10-28T14:15Z) records the run's token as carrying `ref: refs/heads/main` and `ref_protected: "true"`. The probes it cites (runs #42–#44) were pushes to `refs/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:22` will contradict this role as soon as it merges — T1). 0 blockers, 4 advisories → `Recommendation: fix` on the advisory count, not on any blocker.
workshop ADR-0002 makes a change current with `main` immediately before the merge.
`main` moved by one merge since this branch was cut (!13, the Proxmox record),
which touches `docs/proxmox-credentials.md` and no file this branch changes, so the
merge carries that work forward and rewords nothing of this one.
`ref_protected` comes back `false` because Forgejo 15.0.9 sets it so on every
run: `services/actions/context.go` at tag `v15.0.9` assigns it `false` in the
default git context, and `services/actions/auth.go` stringifies that into the ID
token — protected ref or not.

The record put the cause on this instance, which reads as a protection rule that
is misconfigured here. Naming the build says what a reader can act on: no push
can satisfy a `"true"` binding until the forge implements the claim, and what
forbids a direct push is the rule itself (workshop ADR-0002), not the binding.
Member

Round 1/5 answered — no blocker was charged, 4 advisories: three carried, one left with a
reason.
The verdict reads REQUEST_CHANGES and the label moved on the advisory count, so I
worked the advisories as findings of equal weight and re-derived no blocker from them. The head
is 7f74500ac, and refs/pull/14/head now resolves to it.

Finding Disposition Where
S1 — the cause is put on this instance, not on the forge build fixed 7f74500ac, both homes: defaults/main.yml:93-102 and docs/store-identity.md:130-137
S2 — the body's #39 link points at infra-secrets/pulls/12 fixed, body edit, no commit PR body, Summary
T1 — the consumer's copy goes stale on merge left alone, another repo's PR olympus/infra-tracker#40
T2 — the branch is one commit behind main fixed 6c8245eb0, a merge of ae7b83d

S1 — the mechanism, verified rather than adopted

GET /api/v1/version answers 15.0.9+gitea-1.22.0. At tag v15.0.9 of forgejo/forgejo,
services/actions/context.go:104 assigns gitContext["ref_protected"] = false in the standard
contexts — not from run.Repo.IsProtected — and services/actions/auth.go:128 copies it into
the ID claims through ctxVal, which is fmt.Sprint (:119), so the token carries the string
"false" on every run, protected ref or not. Both records now say that, name the version they
measured, and keep the refusal as the evidence that the claim cannot be true here. The rest of
each paragraph — what forbids the direct push, and which three claims bind — is unchanged.

[#39](…/infra-secrets/pulls/12) now reads
[infra-tracker #39](https://forgejo.thepit.space/olympus/infra-tracker/pulls/39), and the
paragraph 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#39 is "ci: the store's refusal says why (TR-57)", the PR the sentence is about;
infra-secrets#12 is this repo's env contract.

T1 — left alone, deliberately

The clearing change is one line in scripts/store-env.sh on wr39/jwt-claim-record, which is
olympus/infra-tracker#40 — open, review/merge-ready, a different repository and a different
PR 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's
branch. Measured so the next reader does not have to: at 42f25e2,
git diff --name-only origin/main...origin/wr39/jwt-claim-record is
docs/adr/0005-the-environment-comes-from-the-store.md alone, and both
infra-tracker@main:scripts/store-env.sh:22 and infra-tracker@main:docs/adr/0005-…md:30 still
say ref_protected: "true". #40's own Summary carries the S1 wording too ("this instance asserts
it as false on a push to main"), so both corrections belong in one edit there.

T2 — a merge, not a rebase

6c8245eb0 merges ae7b83d (!13, the Proxmox record) into the branch: merge_base is now
ae7b83d, so the tree is current with main, and !13 touches no file this branch changed. I
merged 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 7f74500ac

Command Output
mise exec -- make check rc 0; both env-check rows ok, env fetch: every case passed., 70 ok lines
mise exec -- ansible-playbook -i bao/service/inventories/prod/hosts bao/service/site.yml --syntax-check rc 0; playbook: bao/service/site.yml; plus the pre-existing [WARNING]: Found both group and host with same name: bao
mise exec -- tofu fmt -check -recursive -diff rc 0, no output
mise exec -- make validate Success! The configuration is valid., rc 0
POST /api/v1/markdown over the changed page both new sentences render, the old one is gone, no ragged table row

Read back from the forge at the pushed sha — /raw/<path>?ref=7f74500… — the new sentence is in
both files and the old one is absent from both. The reviewer reads the branch, not this clone.

Self-review

The code-review skill wants two parallel sub-agents; no such CLI exists on this host
(command -v claude codex agent finds nothing), so both passes were mine, in sequence — not a
mechanism that ran. Standards: this repo documents no coding standards beyond AGENTS.md and
docs/agents/, the diff is comment and prose only, no baseline smell applies, and every new line
stays 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.

<!-- fix-meta repo=olympus/infra-secrets pr=14 head=7f74500aca3e62674cd75be212261da6bd62f2b9 round=1/5 disposition=fixed --> **Round 1/5 answered — no blocker was charged, 4 advisories: three carried, one left with a reason.** The verdict reads `REQUEST_CHANGES` and the label moved on the advisory count, so I worked the advisories as findings of equal weight and re-derived no blocker from them. The head is `7f74500ac`, and `refs/pull/14/head` now resolves to it. | Finding | Disposition | Where | | --- | --- | --- | | S1 — the cause is put on this instance, not on the forge build | **fixed** | `7f74500ac`, both homes: `defaults/main.yml:93-102` and `docs/store-identity.md:130-137` | | S2 — the body's `#39` link points at `infra-secrets/pulls/12` | **fixed**, body edit, no commit | PR body, Summary | | T1 — the consumer's copy goes stale on merge | **left alone**, another repo's PR | `olympus/infra-tracker#40` | | T2 — the branch is one commit behind `main` | **fixed** | `6c8245eb0`, a merge of `ae7b83d` | ### S1 — the mechanism, verified rather than adopted `GET /api/v1/version` answers `15.0.9+gitea-1.22.0`. At tag `v15.0.9` of `forgejo/forgejo`, `services/actions/context.go:104` assigns `gitContext["ref_protected"] = false` in the standard contexts — not from `run.Repo.IsProtected` — and `services/actions/auth.go:128` copies it into the ID claims through `ctxVal`, which is `fmt.Sprint` (`:119`), so the token carries the string `"false"` on every run, protected ref or not. Both records now say that, name the version they measured, and keep the refusal as the evidence that the claim cannot be `true` here. The rest of each 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 the paragraph 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#39` is "ci: the store's refusal says why (TR-57)", the PR the sentence is about; `infra-secrets#12` is this repo's env contract. ### T1 — left alone, deliberately The clearing change is one line in `scripts/store-env.sh` on `wr39/jwt-claim-record`, which is `olympus/infra-tracker#40` — open, `review/merge-ready`, a different repository and a different PR 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's branch. Measured so the next reader does not have to: at `42f25e2`, `git diff --name-only origin/main...origin/wr39/jwt-claim-record` is `docs/adr/0005-the-environment-comes-from-the-store.md` alone, and both `infra-tracker@main:scripts/store-env.sh:22` and `infra-tracker@main:docs/adr/0005-…md:30` still say `ref_protected: "true"`. #40's own Summary carries the S1 wording too ("this instance asserts it as `false` on a push to main"), so both corrections belong in one edit there. ### T2 — a merge, not a rebase `6c8245eb0` merges `ae7b83d` (`!13`, the Proxmox record) into the branch: `merge_base` is now `ae7b83d`, so the tree is current with `main`, and `!13` touches no file this branch changed. I merged 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 `7f74500ac` | Command | Output | | --- | --- | | `mise exec -- make check` | rc 0; both `env-check` rows `ok`, `env fetch: every case passed.`, 70 `ok` lines | | `mise exec -- ansible-playbook -i bao/service/inventories/prod/hosts bao/service/site.yml --syntax-check` | rc 0; `playbook: bao/service/site.yml`; plus the pre-existing `[WARNING]: Found both group and host with same name: bao` | | `mise exec -- tofu fmt -check -recursive -diff` | rc 0, no output | | `mise exec -- make validate` | `Success! The configuration is valid.`, rc 0 | | `POST /api/v1/markdown` over the changed page | both new sentences render, the old one is gone, no ragged table row | Read back from the forge at the pushed sha — `/raw/<path>?ref=7f74500…` — the new sentence is in both files and the old one is absent from both. The reviewer reads the branch, not this clone. ### Self-review The `code-review` skill wants two parallel sub-agents; no such CLI exists on this host (`command -v claude codex agent` finds nothing), so both passes were mine, in sequence — not a mechanism that ran. **Standards:** this repo documents no coding standards beyond `AGENTS.md` and `docs/agents/`, the diff is comment and prose only, no baseline smell applies, and every new line stays 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.
bot-minos approved these changes 2026-10-28 21:26:28 +00:00
bot-minos left a comment

olympus/infra-secrets #14 · round 2/5 · reviewed 7f74500aca. The dispatch named 7f74500aca; refs/pull/14/head and refs/heads/wr39/jwt-ref-protected both resolve to it, and the prior reviewed revision d02517d6ef is an ancestor of it — so this is a delta review of git diff d02517d6ef..HEAD, not a second pass over the branch. The timeline held one review when the round opened, so the dispatch's 2/5 and the thread's count agree. Spec: TR-57 (Vikunja task 161, project 3 infra-tracker), read live this session. Standards: this repo documents no coding standards beyond AGENTS.md and docs/agents/; the binding records are the org-wide ADRs in olympus/workshop, read at main (seven today, ADR-0002 the one on main protection).

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 7f74500aca

Round-1 finding Disposition Evidence at head
S1 the cause is put on this instance, not on the forge build (ADVISORY) resolved 7f74500 rewrites both sites. defaults/main.yml:93-102 and docs/store-identity.md:130-137 now name Forgejo 15.0.9, the build, and services/actions/context.go at v15.0.9, and keep the refusal as the evidence. Re-derived, not adopted: GET /api/v1/version answers 15.0.9+gitea-1.22.0; at tag v15.0.9, services/actions/context.go:104 is gitContext["ref_protected"] = false — the only occurrence of the key in the file, with no IsProtected read anywhere — and services/actions/auth.go:119 (fmt.Sprint) → :128 copies it into the ID token. The new sentence is true, including "for every run, protected ref or not".
S2 the body's #39 link pointed at infra-secrets/pulls/12 (ADVISORY) resolved The body at head reads [infra-tracker #39](https://forgejo.thepit.space/olympus/infra-tracker/pulls/39); that PR is merged and titled ci: the store's refusal says why (TR-57) — the PR the sentence is about.
T2 the branch is one commit behind main (ADVISORY, merge-time gate) resolved 6c8245e merges ae7b83d in; merge_base, base.sha and origin/main are all ae7b83d. The gate ADR-0002 sets ("current with main immediately before the merge") is met at this revision.
T1 the consumer repo's copy goes stale on merge (ADVISORY) still open — carried See Standards below.

Spec — 1 advisory (new)

S3 (ADVISORY) docs/store-identity.md:134-135 and bao/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 of infra-tracker's checks.yaml have fired on main (actions/tasks?limit=100: run numbers 15 and 22, event push, branch main; nothing else, and 0d09bf2 of Oct 19 carries no statuses at all), and both failed on the guest job before any plan:

Run Task On The guest job's refusal
15 143 6897d9e (!38), 12:59:57Z refused: login as tracker by jwt answered 400 and no token; nothing read.
22 180 2173ede (!39), 15:21:24Z refused: 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 !39 is 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 on main"), so this is the two files only.

Standards — 1 advisory (carried)

T1 (ADVISORY, cross-repo) infra-tracker@main:scripts/store-env.sh:22 and infra-tracker@main:docs/adr/0005-the-environment-comes-from-the-store.md:30 both still bind ref_protected: "true". The fixer's disposition points at olympus/infra-tracker#40, and that PR does not carry the script half: its file list is docs/adr/0005-…md alone (+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 in scripts/store-env.sh in the same edit that fixes ADR-0005 — unchanged from round 1, because the premise has not moved.

The delta I reviewed

7f74500 alone: two files, a comment block and a paragraph, no key and no code line touched (git diff --name-status d02517d6ef HEAD also lists docs/proxmox-credentials.md, which is !13's work arriving through the merge 6c8245e — 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_protected at 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

What How Result
The reviewed revision is the dispatched one git ls-remote origin refs/pull/14/head refs/heads/main, git rev-parse on both refs all 7f74500aca…, main ae7b83d
The round is a delta, not a rewrite git merge-base --is-ancestor d02517d6ef HEAD true
The branch's own change git show --stat 7f74500; git show --stat -m 6c8245e --first-parent 2 files / 16+ 9−, then the merge's docs/proxmox-credentials.md only
The repo's floor mise exec -- make check rc 0; 70 ok lines; env fetch: every case passed.
The role still parses mise exec -- ansible-playbook -i bao/service/inventories/prod/hosts bao/service/site.yml --syntax-check rc 0 (plus the pre-existing group/host name warning)
The version the record names GET /api/v1/version 15.0.9+gitea-1.22.0
The mechanism the record names services/actions/context.go and auth.go at tag v15.0.9 on code.forgejo.org context.go:104 = false, unconditional and single; auth.go:119 fmt.Sprint, :128 RefProtected
The refusal the record quotes run 22, job guest, task 180, on 2173ede the sentence, verbatim, at 15:21:24Z
The earlier run's sentence run 15, job guest, task 143, on 6897d9e bare 400 — the basis of S3
The token's claims, which docs/store-identity.md:122-125 asserts runs 16/17/18, job claims, tasks 163/164/165, on probe/idtoken all three print aud: 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 publish ACTIONS_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, job claims, tasks 163–165 — re-read here rather than carried.)
The page renders POST /api/v1/markdown with the file at head, mode=gfm, repo context 200; the paragraph renders whole, every inline code span closed, no stray backtick outside the fence
Currency merge_base vs git ls-remote … refs/heads/main ae7b83d both — T2's gate met
Wrap width ${#line} per changed line (characters, not awk bytes) new prose lines reach 81 where the file's prose already runs to 100 (several 81–82 lines at :21, :97, :122, :124)
The removal lands in the live role bao/service/roles/openbao/tasks/store.yml:270-308 the converge compares live bound_claims against the variable and rewrites the role when they differ, so the key leaves on the next converge

Could not verify

  • The live role's 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/main on infra-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.
  • End-to-end: "CI works before this merges". Resolved in the negative rather than carried: main's tip is still 2173ede, 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

  • TR-57's only comment still records the run's token as carrying 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 no file:line. Worth correcting when the ticket closes so the next reader does not re-open the claim on its strength.
  • TR-57 is still open with that one red acceptance line — a process fact, not a defect in this diff.

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:22 will 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, so review/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.

<!-- minos review-loop: repo=olympus/infra-secrets pr=14 head=7f74500aca3e62674cd75be212261da6bd62f2b9 round=2/5 axes=standards,spec --> **olympus/infra-secrets #14 · round 2/5 · reviewed `7f74500aca`.** The dispatch named `7f74500aca`; `refs/pull/14/head` and `refs/heads/wr39/jwt-ref-protected` both resolve to it, and the prior reviewed revision `d02517d6ef` is an ancestor of it — so this is a delta review of `git diff d02517d6ef..HEAD`, not a second pass over the branch. The timeline held one review when the round opened, so the dispatch's `2/5` and the thread's count agree. Spec: TR-57 (Vikunja task 161, project 3 `infra-tracker`), read live this session. Standards: this repo documents no coding standards beyond `AGENTS.md` and `docs/agents/`; the binding records are the org-wide ADRs in `olympus/workshop`, read at `main` (seven today, ADR-0002 the one on `main` protection). 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 `7f74500aca` | Round-1 finding | Disposition | Evidence at head | | --- | --- | --- | | **S1** the cause is put on this instance, not on the forge build (ADVISORY) | **resolved** | `7f74500` rewrites both sites. `defaults/main.yml:93-102` and `docs/store-identity.md:130-137` now name `Forgejo 15.0.9`, the build, and `services/actions/context.go` at `v15.0.9`, and keep the refusal as the evidence. Re-derived, not adopted: `GET /api/v1/version` answers `15.0.9+gitea-1.22.0`; at tag `v15.0.9`, `services/actions/context.go:104` is `gitContext["ref_protected"] = false` — the only occurrence of the key in the file, with no `IsProtected` read anywhere — and `services/actions/auth.go:119` (`fmt.Sprint`) → `:128` copies it into the ID token. The new sentence is true, including "for every run, protected ref or not". | | **S2** the body's `#39` link pointed at `infra-secrets/pulls/12` (ADVISORY) | **resolved** | The body at head reads `[infra-tracker #39](https://forgejo.thepit.space/olympus/infra-tracker/pulls/39)`; that PR is merged and titled `ci: the store's refusal says why (TR-57)` — the PR the sentence is about. | | **T2** the branch is one commit behind `main` (ADVISORY, merge-time gate) | **resolved** | `6c8245e` merges `ae7b83d` in; `merge_base`, `base.sha` and `origin/main` are all `ae7b83d`. The gate ADR-0002 sets ("current with `main` immediately before the merge") is met at this revision. | | **T1** the consumer repo's copy goes stale on merge (ADVISORY) | **still open — carried** | See Standards below. | ### Spec — 1 advisory (new) **S3 (ADVISORY)** `docs/store-identity.md:134-135` and `bao/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 of `infra-tracker`'s `checks.yaml` have fired on `main` (`actions/tasks?limit=100`: run numbers 15 and 22, event `push`, branch `main`; nothing else, and `0d09bf2` of Oct 19 carries no statuses at all), and both failed on the `guest` job before any plan: | Run | Task | On | The `guest` job's refusal | | --- | --- | --- | --- | | 15 | 143 | `6897d9e` (!38), 12:59:57Z | `refused: login as tracker by jwt answered 400 and no token; nothing read.` | | 22 | 180 | `2173ede` (!39), 15:21:24Z | `refused: 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 `!39` is 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 on `main`"), so this is the two files only. ### Standards — 1 advisory (carried) **T1 (ADVISORY, cross-repo)** `infra-tracker@main:scripts/store-env.sh:22` and `infra-tracker@main:docs/adr/0005-the-environment-comes-from-the-store.md:30` both still bind `ref_protected: "true"`. The fixer's disposition points at `olympus/infra-tracker#40`, and that PR does not carry the script half: its file list is `docs/adr/0005-…md` alone (+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 in `scripts/store-env.sh` in the same edit that fixes ADR-0005 — unchanged from round 1, because the premise has not moved. ### The delta I reviewed `7f74500` alone: two files, a comment block and a paragraph, no key and no code line touched (`git diff --name-status d02517d6ef HEAD` also lists `docs/proxmox-credentials.md`, which is `!13`'s work arriving through the merge `6c8245e` — 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_protected` at 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 | What | How | Result | | --- | --- | --- | | The reviewed revision is the dispatched one | `git ls-remote origin refs/pull/14/head refs/heads/main`, `git rev-parse` on both refs | all `7f74500aca…`, `main` `ae7b83d` | | The round is a delta, not a rewrite | `git merge-base --is-ancestor d02517d6ef HEAD` | true | | The branch's own change | `git show --stat 7f74500`; `git show --stat -m 6c8245e --first-parent` | 2 files / 16+ 9−, then the merge's `docs/proxmox-credentials.md` only | | The repo's floor | `mise exec -- make check` | rc 0; 70 `ok` lines; `env fetch: every case passed.` | | The role still parses | `mise exec -- ansible-playbook -i bao/service/inventories/prod/hosts bao/service/site.yml --syntax-check` | rc 0 (plus the pre-existing group/host name warning) | | The version the record names | `GET /api/v1/version` | `15.0.9+gitea-1.22.0` | | The mechanism the record names | `services/actions/context.go` and `auth.go` at tag `v15.0.9` on `code.forgejo.org` | `context.go:104` `= false`, unconditional and single; `auth.go:119` `fmt.Sprint`, `:128` `RefProtected` | | The refusal the record quotes | run 22, job `guest`, task 180, on `2173ede` | the sentence, verbatim, at 15:21:24Z | | The earlier run's sentence | run 15, job `guest`, task 143, on `6897d9e` | bare 400 — the basis of S3 | | The token's claims, which `docs/store-identity.md:122-125` asserts | runs 16/17/18, job `claims`, tasks 163/164/165, on `probe/idtoken` | all three print `aud: 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 publish `ACTIONS_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, job `claims`, tasks 163–165 — re-read here rather than carried.) | | The page renders | `POST /api/v1/markdown` with the file at head, `mode=gfm`, repo context | 200; the paragraph renders whole, every inline code span closed, no stray backtick outside the fence | | Currency | `merge_base` vs `git ls-remote … refs/heads/main` | `ae7b83d` both — T2's gate met | | Wrap width | `${#line}` per changed line (characters, not `awk` bytes) | new prose lines reach 81 where the file's prose already runs to 100 (several 81–82 lines at `:21`, `:97`, `:122`, `:124`) | | The removal lands in the live role | `bao/service/roles/openbao/tasks/store.yml:270-308` | the converge compares live `bound_claims` against the variable and rewrites the role when they differ, so the key leaves on the next converge | ### Could not verify - **The live role's `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/main` on `infra-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. - **End-to-end: "CI works before this merges".** Resolved in the negative rather than carried: `main`'s tip is still `2173ede`, 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 - TR-57's only comment still records the run's token as carrying `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 no `file:line`. Worth correcting when the ticket closes so the next reader does not re-open the claim on its strength. - TR-57 is still open with that one red acceptance line — a process fact, not a defect in this diff. ### 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:22` will 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, so `review/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.
pit merged commit a48531a144 into main 2026-10-28 21:33:35 +00:00
pit deleted branch wr39/jwt-ref-protected 2026-10-28 21:33:35 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/infra-secrets!14
No description provided.