chore: create the kamino-release bot account, its token, the v* tag allowlist entry and the repository secret #174

Open
opened 2026-11-15 18:39:17 +00:00 by Claude · 5 comments
Owner

Spec: Release automation. Repository settings are the maintainer's.

Blocked by the settings issue: it creates the release/* branch rule that step 4a adds the bot to.

What

  1. Create a Gitea bot account kamino-release (bot accounts are new in Gitea 28; how one is issued a token is unverified, so if it cannot get one, use an ordinary user account used for nothing else).
  2. Give it write access to Mortis/Kamino only, as a collaborator: not an organisation owner, no other repository. It is not added to the merge allowlist.
  3. Issue it a token scoped to repository write (opening pull requests, pushing release/next, creating releases and tags), nothing else.
  4. Add the account to the v* protected-tag allowlist, next to the maintainer.
    4a. Add the account to the push and force-push allowlist of the release/* branch rule (release/* keeps its push allowlist, decided in Pushes onto a pull request that has a scheduled merge). The settings issue creates that rule with the maintainer only, so this step waits for it.
  5. Store the token as a repository secret (not an organisation secret), e.g. RELEASE_TOKEN, used only by release.yml.
  6. Comment here with the secret name so the release workflow issue can use it.

This issue holds all of the release bot's access. The settings issue no longer has a release bot step.

Acceptance

  • With the bot's token, a branch can be pushed and a pull request opened on this repository. Note the test on this issue.
  • With the bot's token release/next can be pushed and force-pushed; with the agent account's token it cannot.
  • The account is on the v* tag allowlist and is not an organisation owner.

Why

The Actions job token cannot do this job on Gitea 28.0.0: pull requests it opens start no workflows (so the required checks never run), and the Actions user cannot be added to a protected-tag allowlist.

Accepted risk

Same-repo pull requests can read repository secrets, so anyone with write access can read this token and push a tag. The threat model accepts "write access is secret access"; the ADR records it.

Not verified

How a Gitea 28 bot account gets a token.

Spec: [Release automation](https://git.rkdr.net/Mortis/Kamino/issues/98). Repository settings are the maintainer's. Blocked by [the settings issue](https://git.rkdr.net/Mortis/Kamino/issues/192): it creates the `release/*` branch rule that step 4a adds the bot to. ## What 1. Create a Gitea bot account `kamino-release` (bot accounts are new in Gitea 28; how one is issued a token is unverified, so if it cannot get one, use an ordinary user account used for nothing else). 2. Give it write access to `Mortis/Kamino` only, as a collaborator: not an organisation owner, no other repository. It is not added to the merge allowlist. 3. Issue it a token scoped to repository write (opening pull requests, pushing `release/next`, creating releases and tags), nothing else. 4. Add the account to the `v*` protected-tag allowlist, next to the maintainer. 4a. Add the account to the push and force-push allowlist of the `release/*` branch rule (`release/*` keeps its push allowlist, decided in [Pushes onto a pull request that has a scheduled merge](https://git.rkdr.net/Mortis/Kamino/issues/248)). [The settings issue](https://git.rkdr.net/Mortis/Kamino/issues/192) creates that rule with the maintainer only, so this step waits for it. 5. Store the token as a **repository** secret (not an organisation secret), e.g. `RELEASE_TOKEN`, used only by `release.yml`. 6. Comment here with the secret name so the release workflow issue can use it. This issue holds all of the release bot's access. [The settings issue](https://git.rkdr.net/Mortis/Kamino/issues/192) no longer has a release bot step. ## Acceptance - With the bot's token, a branch can be pushed and a pull request opened on this repository. Note the test on this issue. - With the bot's token `release/next` can be pushed and force-pushed; with the agent account's token it cannot. - The account is on the `v*` tag allowlist and is not an organisation owner. ## Why The Actions job token cannot do this job on Gitea 28.0.0: pull requests it opens start no workflows (so the required checks never run), and the Actions user cannot be added to a protected-tag allowlist. ## Accepted risk Same-repo pull requests can read repository secrets, so anyone with write access can read this token and push a tag. The threat model accepts "write access is secret access"; the ADR records it. ## Not verified How a Gitea 28 bot account gets a token.
Claude added the
Status
Ready for Human
label 2026-11-15 18:39:17 +00:00
Claude added this to the Continuous delivery milestone 2026-11-15 22:21:21 +00:00
Author
Owner

Review of the map (2026-11-15): corrections to this issue.

  • The release bot's repository access is set up in another milestone. chore: apply the recommended repository settings, account permissions and branch protection (Open to friends) has a step 1 item "Release bot (when the bot account issue is done): write collaborator; v* tag allowlist; write:repository token as a repository secret", and its acceptance needs that test. This issue already holds the same work (items 2 to 5) and is in Continuous delivery, so the settings issue cannot close before this one. Proposal for the maintainer: keep the release-bot setup and its test here only, add "test: the bot pushes a branch and opens a pull request with the token" to this issue, and drop the item from the settings issue.
Review of the map (2026-11-15): corrections to this issue. - **The release bot's repository access is set up in another milestone.** [chore: apply the recommended repository settings, account permissions and branch protection](https://git.rkdr.net/Mortis/Kamino/issues/192) (*Open to friends*) has a step 1 item "Release bot (when the bot account issue is done): write collaborator; `v*` tag allowlist; `write:repository` token as a repository secret", and its acceptance needs that test. This issue already holds the same work (items 2 to 5) and is in *Continuous delivery*, so the settings issue cannot close before this one. Proposal for the maintainer: keep the release-bot setup and its test here only, add "test: the bot pushes a branch and opens a pull request with the token" to this issue, and drop the item from the settings issue.
Author
Owner

Review of the map (2026-11-17).

  • This issue says it "holds all of the release bot's access", but it has no step for the release/* push allowlist decided in Code-owner approval against Renovate automerge, and where secrets live, point 6. Add step 4a: add the account to the push and force-push allowlist of the release/* branch rule, which the settings issue creates with the maintainer only. Acceptance addition: with the bot's token release/next can be pushed and force-pushed; with the agent account's token it cannot.
  • That step applies only if the release/* rule is kept; open in Pushes onto a pull request that has a scheduled merge.
  • "The Actions job token cannot do this job on Gitea 28.0.0" was read at that version. The server reports 28.3.0 on 2026-11-17, and 28.3.0 changed the scope of the Actions task token. Not re-read; check the two facts again on the version the server runs when this issue is worked.
Review of the map (2026-11-17). - This issue says it "holds all of the release bot's access", but it has no step for the `release/*` push allowlist decided in [Code-owner approval against Renovate automerge, and where secrets live](https://git.rkdr.net/Mortis/Kamino/issues/210), point 6. Add step 4a: add the account to the push and force-push allowlist of the `release/*` branch rule, which the settings issue creates with the maintainer only. Acceptance addition: with the bot's token `release/next` can be pushed and force-pushed; with the agent account's token it cannot. - That step applies only if the `release/*` rule is kept; open in [Pushes onto a pull request that has a scheduled merge](https://git.rkdr.net/Mortis/Kamino/issues/248). - "The Actions job token cannot do this job on Gitea 28.0.0" was read at that version. The server reports 28.3.0 on 2026-11-17, and 28.3.0 changed the scope of the Actions task token. Not re-read; check the two facts again on the version the server runs when this issue is worked.
Author
Owner

Body edited on 2026-11-20 (final validation round of the map, #87 (comment)): added step 4a (the bot joins the push and force-push allowlist of the release/* rule, which is kept per #248 and created by #192 with the maintainer only) and its acceptance test from the 2026-11-17 comment. No gate about unattended agents is added before the token is stored: decision 2 of that round withdrew it.

Body edited on 2026-11-20 (final validation round of the map, https://git.rkdr.net/Mortis/Kamino/issues/87#issuecomment-12281): added step 4a (the bot joins the push and force-push allowlist of the `release/*` rule, which is kept per #248 and created by #192 with the maintainer only) and its acceptance test from the 2026-11-17 comment. No gate about unattended agents is added before the token is stored: decision 2 of that round withdrew it.
Author
Owner

Final validation round, second pass (2026-11-20): body edited.

  • Added dependency: blocked by #192 (maintainer's decision), because #192 creates the release/* branch rule that step 4a adds the bot to; a line saying so is in the body, next to step 4a. #192's own "does not wait for #174" stays true.
Final validation round, second pass (2026-11-20): body edited. - Added dependency: blocked by #192 (maintainer's decision), because #192 creates the `release/*` branch rule that step 4a adds the bot to; a line saying so is in the body, next to step 4a. #192's own "does not wait for #174" stays true.
Author
Owner

Scope added by #359, the pull request for #262: docs/contributing/maintaining.md lists only the secrets a workflow references today, so the release bot is not in it yet. When the release bot's token becomes a secret that a workflow references, the same change updates maintaining.md in three places:

  • Secrets and rotation: add a row for the token with its variable name, the workflow, "Release bot", write:repository, and "Token issued on the bot's account in this Gitea; repository secret".
  • Intended settings: add the release bot to the release/* push allowlist and the v* tag allowlist.
  • Agent and bot accounts: check that the scope list still covers every bot.
Scope added by #359, the pull request for #262: `docs/contributing/maintaining.md` lists only the secrets a workflow references today, so the release bot is not in it yet. When the release bot's token becomes a secret that a workflow references, the same change updates `maintaining.md` in three places: - **Secrets and rotation:** add a row for the token with its variable name, the workflow, "Release bot", `write:repository`, and "Token issued on the bot's account in this Gitea; repository secret". - **Intended settings:** add the release bot to the `release/*` push allowlist and the `v*` tag allowlist. - **Agent and bot accounts:** check that the scope list still covers every bot.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#174