Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Phase 4: the runner signs the result it reports

22528ac3da576387a8311969641a7b5783b04924 · Keenan Nemetz · 17d ago · parent 86fe5bb4

Phase 4: the runner signs the result it reports

An instance-key signature is the server witnessing itself. It cannot be checked
without trusting the box that produced it, and it says nothing about the party that
ran the steps — so a record signed that way would have been paperwork. The runner
already holds a key, the one it connects with, so the runner is what signs.

At finish the runner signs a claim: run, repo, ref, SHA, workflow blob, the digest of
the steps pinned when the job was queued, exit code, the log's {oid, size}, the
artifacts it published, and its own finishing time. The server rebuilds the same claim
from its own row plus what the runner reports, verifies the signature, and stores the
payload and signature verbatim — so a verifier re-checks the bytes that were signed
rather than re-deriving them from a format that might have drifted.

Who the signer is comes from the channel, not the claim: the account is the one the
SSH key resolved to, and the signature must verify under one of that account's keys.
A runner may therefore sign with a different key from the one it connected with — an
agent-held key to connect, a file to sign — but not as somebody else.

Refusals, all before anything is recorded, because half a record is worse than none:
an unsigned finish (an unattributed result is what the queue already had), a signature
by another account's key, and a signature over a different claim. The run page shows
`attested by <name> · key <fingerprint>`, and `vole runner` now pings first and refuses
to start work when the key it will sign with is not one its account holds — discovering
that after a ten-minute build is a wasted build.

`steps_sha` is recorded at enqueue and travels with the lease, so the claim covers the
steps that ran and not merely the workflow file they came from.

What this does not buy: truth. A runner can still lie about an exit code. It buys
accountability — the record is attributable to a party other than the instance.
Whether a required check must be attested by a particular runner (an ACL key defaulting
to the instance's own) is the next policy question and is deliberately not answered
here; any admin of the repository may still supply the signature.

Verified: TestAFinishedRunBelongsToTheRunnerThatSignsIt drives the real protocol over
SSH — the lease carries what the claim names, ping names the account and its keys,
unsigned and wrong-account and wrong-claim finishes are all refused with nothing
recorded, the correct one is accepted, and the stored payload still verifies under the
stored signature; TestClaimRendersOneWay pins the byte form (including artifact
ordering and an empty log) and TestClaimRefusesToForgeItself refuses a field carrying a
newline; TestStepDigestFollowsTheSteps shows the digest covering the steps themselves;
the cmd tests cover key discovery from VOLE_SSH_COMMAND/GIT_SSH_COMMAND, the missing-key
message, a non-key file, and the pre-work refusal; and the end-to-end test that runs the
real binary asserts the claim names the run, its log and its exit, and that the run page
says who attested it. scripts/ci.sh green (gofmt, vet, build, markdown links, go test
-race ./...).

README.md +16−1

@@ -47,7 +47,7 @@ Working today:
47 47 page with its patch, and a change request with the diff that would land
48 48 - CI: workflows in `.vole/workflows/*.yaml`, validated by the push that introduces
49 49 them. A push queues jobs; `vole runner` leases one over SSH with the same key, runs
50 the shell steps and uploads the attempt's log. A job can declare `artifacts:`
50 the shell steps, uploads the attempt's log and signs the result. A job can declare `artifacts:`
51 51 (path patterns), which the runner uploads and the run page serves. Protected
52 52 branches can require green checks as well as approvals
53 53 - LFS: large files stay out of the git object database and live in one
@@ -365,6 +365,21 @@ server wrote, and the runner is the party that can be held to it. `/r/<repo>/run
365 365 serves it, `?attempt=N` picks one attempt out of a retried job, and an attempt whose
366 366 runner was killed has no log at all.
367 367
368 A runner signs every result it reports. The signature covers what was run and what
369 came of it — repo, ref, SHA, the workflow blob, the digest of the pinned steps, the
370 exit code, the log's object id and the artifacts — and the claim is stored as the
371 bytes that were signed, so it can be checked later and not merely believed. The
372 signing key must belong to the account the connection authenticated as: the SSH
373 channel decides who the runner is, and a runner may sign with a different key from
374 the one it connected with but not as somebody else. `vole runner --key` defaults to
375 the `-i` of `$VOLE_SSH_COMMAND`/`$GIT_SSH_COMMAND`, else `~/.ssh/id_ed25519`, and the
376 runner refuses to start if that key is not one its account holds. The run page names
377 the account and the key.
378
379 What a signature does not buy is truth: a runner can still lie about an exit code.
380 It buys accountability — the record is attributable to a party other than the
381 instance, which an instance-signed record never could be.
382
368 383 A runner that disappears has its job requeued; after five attempts the job fails
369 384 instead of cycling forever. Protected branches can require green checks as well as
370 385 approvals.