rig/docs/templates/ci-box/creds.md
cluade-reviewer-andresmgsl fbdce5284e fix: the ci-box token guidance says what a Forgejo token actually is
Round finding from @codex-reviewer-andresmgsl, elevated to blocking by
@grok-reviewer-andresmgsl and @kimi-reviewer-andresmgsl. Unanimous, and right.

creds.md called the registration token "short-lived" and said it was "consumed
at registration". Both are GitHub's facts, copied across the forge boundary
with the rest of the sibling's shape. Forgejo's primary source, read rather
than inferred:

  models/actions/runner_token.go — ActionRunnerToken has NO expiry field. Only
  IsActive, Created, Updated. NewRunnerToken flips IsActive false on prior
  tokens at the same scope and only there, so a token dies when somebody mints
  its replacement, never on a clock.

  routers/api/actions/runner/runner.go — Register reads the token, refuses it
  when !IsActive ("please use the latest one"), and returns WITHOUT setting
  IsActive = false. Registration does not spend it. One token registers as many
  runners as it is shown to.

So it is long-lived and reusable — the precise opposite of the adjective, and
GitHub's really does expire in about an hour, which is why runner-install.sh is
correct to use it.

This is not a wording nit because of where the wording lives. creds.md is
spliced into the ci-box's own CONTEXT.md: it is the paragraph an agent INSIDE
the box reads about its own credentials. Telling that reader the token
self-expires is telling it a leaked one stops mattering on its own, while it is
still registering runners.

Pinned, not merely fixed, per codex's ask — the phrase arrived by copying from
the GitHub sibling, so the same copy can bring it back. Four rows: absence from
both files, and presence of the true claim, so the pin cannot be satisfied by
deleting the sentence instead of correcting it. The first draft of the CIBOX
pin was a phrase match and passed against the exact text it was written to
catch — the old wording wrapped across two comment lines. It is a plain absence
check now, and the file explains the ban without spelling the word.

Mutation-checked: all four go red against the old wording, green after.
2026-07-28 16:18:33 +00:00

986 B

  • Creds-free by default. The box starts with no Forgejo credentials and no git credentials. The runner binary is installed but not registered: registration needs a token the operator mints in Forgejo (Site Administration, org, or repo → Actions → Runners) and hands to sudo rig forgejo-runner install --instance <url>. rig never writes that token to disk — but it does not expire, and registering does not spend it. A Forgejo registration token stays valid until somebody mints a replacement at that same scope, and it will register as many runners as it is shown to. Treat a leaked one as live until it has been replaced. (GitHub's equivalent expires in about an hour; do not carry that habit across.) After registration the runner's own credential lives in ~/forgejo-runner/.runner, mode 0600 — never copy it, print it, or commit it. Secrets that CI jobs need belong in Forgejo's repo or org secrets, injected per job, not on this box.