The Semaphore runner reaches infra-forge, and forge gets its CI login (SC-16) #31
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-secrets!31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/sc16-semaphore-runner-infra-forge"
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?
Implements SC-16. The infra-silo half (the three deploy-key policies) is olympus/infra-silo's PR on
hermes/sc16-forge-deploy-state-keys.Summary
Decided with the Operator in the session: the Forgejo token is a restricted forge user
semaphorewith Write on infra-forge only, tokenwrite:repositorylimited to that repository, stored atsecret/services/semaphore/forgejo-status. The ticket's "can't push" isn't expressible: Forgejo 15.0.9 gatesPOST /repos/…/statuses/{sha}onreqRepoWriter(unit.TypeCode), the same right as a push. The residual risk (it can push a non-main branch or tag to infra-forge) is written in the policy header and the identity page. The JWT role isforge/ci-forgeby the store's naming convention (ticket text saidci-forgefor the role).Evidence
Live, 2026-11-09 (all already applied; this PR records it):
make service-checkbefore: 3 writes (automation-runner, ci-forge, jwt/role/forge).make service:changed=3.make service-checkafter:changed=0. Both policies read back byte-identical;auth/jwt/role/forgebound toolympus/infra-forge,refs/heads/main,push, audopenbao, 10m/20m.semaphore, own seed): 16 reads 200 (the 11 new + tracker's/shared), 17 refusals 403 (forge apply/plan keys,ci/forge/semaphore-api,silo/*, Semaphore server paths, …), LIST 403,capabilities-self=readonly. Token revoked.pveum user token permissions infra-runner@pve deploylists /vms/141, /vms/142, /vms/146, no VM.Allocate, no VM.PowerMgmt. As the token: config of 141/142/146 200, 143/144/145/150 403, create 403.sc16/status-token-probe), infra-secrets 404,/user403, repo search lists infra-forge only. main's protection:enable_push: false.make checkgreen (before the env.sh change, the newforge actorcase was red:forge logs in by the JWT doorFAIL).Not proved yet: a
forgelogin from a real push-to-main run. That's FO-50's first deploy.Merge Danger
Door: two-way
Blast Radius: store
The store already carries this text, so merge soon: the role never deletes, but a
make servicefrom today'smainrewritesautomation-runnerback to the tracker-only text and takes infra-forge's reach away from the runner.scripts/env.shmoves to a new pin; the other four repositories take it at their next re-vendor (infra-forge's FO-50 needs it forACTOR=forge). Undo of the live half: revert,make service(policy text), andbao delete auth/jwt/role/forge+bao policy delete ci-forgeby hand (the role adds, never deletes).Review started (round 1/5) on
2bb56f7bee— reading the diff now.repo olympus/infra-secrets · PR #31 · reviewed head
2bb56f7bee· round 1/5 (no earlier review on the thread) · verdict: mergeRecommendation: merge
No blockers. Two advisories, so the volume rule does not trip. Both are advice, and neither blocks.
Spec: SC-16 (Vikunja task 274), read live with its three comments. Its four acceptance criteria are the contract. The comments govern the body where they differ: the Operator's decisions name the JWT role
forge(policyci-forge, where the ticket text saidci-forgefor the role) and amend "can't push" to an accepted risk.Standards:
AGENTS.md§Checks (make checkis the floor), workshop ADR-0002, ADR-0007, ADR-0010 and ADR-0012, read frommain. The repo keeps nodocs/adr/of its own and no wrap-width rule.Standards
bao/policies/automation-runner.hcl:25-30anddocs/store-identity.md:167-173: the accepted-risk text is narrower than the right it records.POST /statuses/{sha}is gated onreqRepoWriter(unit.TypeCode). I confirmed this in thev15.0.9routers/api/v1/api.go. The same Write right therefore lets the holder set any status context on any infra-forge commit, including a pull request's head. A forged green on a required check satisfies the merge gate in ADR-0002 §"The checks the repository defines gate the merge".on: pushworkflow runs with that repository's Actions secrets.docs/proxmox-credentials.mdlistsPROXMOX_VE_PLAN_API_TOKENonolympus/infra-forge, andplan.ymlin infra-forge'smainreads theFORGE_GUEST_PLAN_STATE_*secrets. I could not drive this live: this identity has no write on infra-forge and cannot read its branch protection (the API answered 403 "owner or collaborator with admin write").docs/store-identity.md:148-156and:196: the hand-edited paragraphs were not reflowed.grows: the.Standards-axis baseline smells: none found.
automation-runner.hclrepeatspath … { capabilities = ["read"] }, which is the file's established named-path shape. Collapsing it would break ADR-0007's whole-grant rule.Spec
All four SC-16 acceptance criteria are met by the diff, or honestly named as pending. No findings.
bao-policy-capability-probe.shon a throwaway dev server with the headautomation-runner.hcl. All 11 new ACL paths giveread. Near-misses givedeny:forgejo/db/x,forgejo/dbx,forgejo/admin,semaphore/forgejo-status2, forgeapplyandplankeys,ci/forge/semaphore-api,semaphore/config,semaphore/admin, andlistonmetadata/services/forgejo/.pveum … deploylists /vms/141, 142, 146docs/proxmox-credentials.mdrows and the recipe loop (:179-211) agree with each other and withstore-layout.md:176andstore-identity.md:112,258.ci-forgetoken only for a push on main in infra-forgestore-identity.md:79-84; ticket comment 2).defaults/main.yml:133-140has the same shape astrackerandcockpit.ci-forge.hclgivesreadonsecret/data/ci/forge/semaphore-apialone. The probe showsdenyonci/forge/other,…/semaphore-api/x,ci/tracker/semaphore-api,forgejo-status, the forge deploy key and alist.store.yml:120globsbao/policies/*.hcl, so the new file is picked up with no list to edit.smtpandci/forge/semaphore-apideclarations are the "undeclared but already in the store" paths, and the ticket comment says so.grep -c '^path 'gives 20, and the base-vs-head path diff adds exactly the 11, with no duplicates and no capability other thanread.deployrows added, and the forgeapply/planrows already existed at base.forgejo-status+forgejo/smtp+ci/forge/semaphore-api.ls bao/policies.What I verified, and how
Head:
refs/pull/31/headresolves to2bb56f7, the dispatch SHA. It descends fromorigin/mainfc69677, so the PR is current. It is a single commit.make checkat head: exit 0, 124okand 0FAIL. Forgejo CI reportspr-checks / check (pull_request)as success on this SHA.Pin:
env-checkreports the copy matches its pin. A control copy re-pinned unmutated runs green, so the re-pin helper is neutral.Mutation of the new test
case_forge_actor, withenv.shre-pinned each time so the pin check is not the red:forgedropped from the CI actorscockpitthe fetch exited 0 with the wrong role's tokenforgeclassed as AppRoleThe test can fail, and it fails for the reasons it names.
Evidence scripts: under
cache/scratch/infra-secrets-31-r1/(wave1.sh,wave2.sh,wave3b.sh).Could not verify (attempt made, refusal stated)
changed=3run, byte-identical read-back, the 16/17 login counts,pveumoutput, the Forgejo token's 201/404/403 results,enable_push: false): the profile.envholds only Forgejo and Vikunja keys, so there is no store or Proxmox credential. The author's recorded results are unchecked by me. The policy and role text they apply is what I reproduced above.search_userslacked theread:userscope. This is the gap behind advisory 1.Named, not charged
ACTOR=forgein the other four repositories: they re-vendorenv.shat their next pull of the pin, and infra-forge's FO-50 needs it. The PR body discloses this, and each repo'senv-checkreads its own copy against its own pin.forgelogin from a real push-to-main run, and the public half of the Semaphore key on 141 and 146: pending FO-50 by the PR's and the ticket's own words.make servicefrom today'smainwould rewriteautomation-runner. The PR body discloses this, and no code issue follows from it.Summary
Recommendation is
merge: there are no blockers, and two advisories is under the three that would turn the recommendation.