Merge-robot auth: ROBOT_TOKEN secret (GITEA_TOKEN is reserved read-only auto token) #213

Merged
conductor merged 1 commits from merge-robot-auth into master 2026-09-07 21:59:22 +01:00
Owner

Root cause (18 consecutive loud failures)

secrets.GITEA_TOKEN is reserved in Gitea Actions — it resolves to the auto-generated per-run token, whose scopes are capped by the workflow permissions: block (contents: read). The merge endpoint requires contents:write → every merge attempt 403s → fail-loud robot refuses the job. Repo secrets list was EMPTY ([]) — no override existed.

Fix

One line: authenticate via secrets.ROBOT_TOKEN (conductor token, created via API, admin-scoped, passes /user identity check).

Hardening note (follow-up)

Conductor admin token in a CI secret is acceptable for a private repo but over-privileged; a dedicated scoped token (repository:write + issue:write + user:read) minted via UI is the follow-up.

## Root cause (18 consecutive loud failures) `secrets.GITEA_TOKEN` is **reserved** in Gitea Actions — it resolves to the auto-generated per-run token, whose scopes are capped by the workflow `permissions:` block (`contents: read`). The merge endpoint requires contents:write → every merge attempt 403s → fail-loud robot refuses the job. Repo secrets list was EMPTY (`[]`) — no override existed. ## Fix One line: authenticate via `secrets.ROBOT_TOKEN` (conductor token, created via API, admin-scoped, passes `/user` identity check). ## Hardening note (follow-up) Conductor admin token in a CI secret is acceptable for a private repo but over-privileged; a dedicated scoped token (repository:write + issue:write + user:read) minted via UI is the follow-up.
conductor added 1 commit 2026-09-07 21:54:02 +01:00
fix(pipeline): merge-robot authenticates via ROBOT_TOKEN secret — GITEA_TOKEN is the reserved read-only auto token (root cause of 18 consecutive loud failures)
CI Pipeline / best-practices (push) Successful in 4s
CI Pipeline / documentation (push) Successful in 3s
Auto-label / priority-gate (pull_request) Skipped
Auto-label / auto-label (pull_request) Successful in 2s
CI Pipeline / lint (push) Successful in 27s
CI Pipeline / canary (push) Successful in 28s
CI Pipeline / type-check (push) Successful in 23s
CI Pipeline / unit-tests (push) Successful in 36s
CI Pipeline / gitea-offline (push) Successful in 18s
CI Pipeline / required-checks (push) Skipped
CI Pipeline / best-practices (pull_request) Successful in 3s
CI Pipeline / documentation (pull_request) Successful in 4s
CI Pipeline / lint (pull_request) Successful in 42s
CI Pipeline / unit-tests (pull_request) Successful in 58s
CI Pipeline / gitea-offline (pull_request) Successful in 24s
CI Pipeline / type-check (pull_request) Successful in 51s
CI Pipeline / canary (pull_request) Successful in 1m22s
CI Pipeline / required-checks (pull_request) Successful in 0s
c68f313229
gitea-actions Bot added the bugcustodianidentity labels 2026-09-07 21:54:10 +01:00
conductor merged commit 9530413578 into master 2026-09-07 21:59:22 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conductor/rune#213