Sign runner-start statements for each sandbox #22
Labels
No labels
terraform-plane
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jhgaylor/sluice#22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
(needs INTENTIUS/terragucci#1154 and a terragucci that pins chant 0.124.33 or later; after #21. chant#4147 shipped in chant 0.124.33, PR #4173.)
Part of the terraform-plane epic (arugula-salad/arugula#1141). Lands after terragucci's next release, the first built on chant 0.124.41 or later (chant#4287); npm's newest is still 0.4.40, on chant 0.124.24.
terragucci is adding
runner.apply.require: ephemeral(INTENTIUS/terragucci#1154): an apply job refuses to run, before it trades for any credentials, unless the runner proves it was started for that one job. The proof is chant'srunner-start/v1statement (INTENTIUS/chant#4147): signed by the provisioner that started the runner, with a key the job never holds, naming the CI system, the job, run and attempt ids, the repo and the commit, and verified against arunnerskey in.chant/trust.json.sluice already starts a fresh loam sandbox for every stage and destroys it after, so it is that provisioner. Without a statement, an estate that turns the setting on can't apply under sluice at all.
chant 0.124.33 settled both open questions (
packages/core/src/runner-start.ts):https://intentius.io/chant/runner-start/v1, subject the commit (digest.gitCommit), predicate{signer, ci:{system, repo, run, attempt, job}, runner:{name?, singleJob:true}, issuedAt}, parsed strictly. No age limit by default.ci.systemisgithub | gitlab | forgejoonly, so sluice signs asgithub(a Forgejo estate asforgejo) with its shim's ids.ciJobFromEnvrequiresGITHUB_ACTIONS=true,GITHUB_REPOSITORY,GITHUB_RUN_ID,GITHUB_JOB,GITHUB_SHAandRUNNER_NAME, and readsGITHUB_RUN_ATTEMPT(default 1). Non-numeric run ids are accepted. sluice'sstageEnvsets none ofGITHUB_ACTIONS,GITHUB_JOB,RUNNER_NAMEorGITHUB_RUN_ATTEMPT, so it adds them (job = the stage and wave, runner = the sandbox id).GITHUB_ACTIONS=truemakes terragucci print::add-mask::<value>lines (secret-values.ts:59), so sluice's run log must redact them.CHANT_RUNNER_START(the envelope as JSON), else the file named byCHANT_RUNNER_START_FILE, else/run/chant/runner-start.json.chant ci runner-start sign --key <pem> --principal <p> --job <json>, orsignRunnerStartfrom the bundle-safe@intentius/chant/runner-start.runnersin.chant/trust.jsonat base, and its principal holdsroles.runner.chant workspace trust runner addwrites the entry (chant#4119). A runner entry the signers file also lists is dropped.Done when:
.chant/trust.jsonon the estate's default branch, not a JWKS update), and signs arunner-start/v1statement for each stage it starts, naming that run, attempt and commit.CHANT_RUNNER_STARTor a file named byCHANT_RUNNER_START_FILE, the stage env carries theGITHUB_*andRUNNER_NAMEfields above,::add-mask::lines are redacted from the log, and the key never enters the sandbox..chant/trust.jsonentry to add, as it shows the OIDC trust snippets (or thechant workspace trust runner addcommand).runner.apply.require: ephemeralapplies under sluice; a statement for another run or commit is refused; a test covers both.docs/oidc.md(or a new page) says what the statement proves and what it doesn't.Related: arugula-salad/arugula#1141.
From a review of sluice against chant's in-flight work (2026-10-20). Proposal for the maintainer; PRs would come from lex00/sluice.
Updated 2026-10-22 for terragucci main (pins chant 0.124.41, terragucci#1212–#1223) and chant 0.124.41–0.124.42.