docs(adr): record the threat model as ADR 0001 #143

Closed
opened 2026-11-14 22:32:29 +00:00 by Claude · 18 comments
Owner

Spec: Threat model: what we defend against and what we accept (resolution comment), as changed by Where the maintainer's own procedures live, and what "held by review" means for them and the decisions named below.

What

Write docs/adr/0001-threat-model.md, which records the stance only, and add an "Accepted risks" section to SECURITY.md, which holds the register. The ADR has these sections:

  • Actors and how far each is defended. The actor table has one fork/AGit actor, the outsider: a human closes the pull request without approving its runs and points to issues; it is never approved or merged. Another actor: instructions injected through issue, pull request or repository text an agent reads.
  • Assets in priority order.
  • Trust boundary. One line names the two positions: a trusted contributor has write access and the secrets; an outsider's fork or AGit pull request is closed, never approved. Write access to this repository is access to its secrets. Least privilege limits a token's API scope and merge rights, not its reach to this repository's secrets: every write-capable token (humans, the agent account, Renovate, the release bot) can push a branch workflow that reads them. Secrets are at repository level when a second repository joins the organisation. Say "every secret this repository's workflows can reach". When a writer is removed, or any write-capable token leaks, the maintainer rotates every repository secret; the rotation list lives in docs/contributing/maintaining.md, not in the ADR.
  • Least-privilege target for tokens, as one-line targets, not how-to. Each agent account has exactly one accountable person, named in its Gitea profile, and sits in a team with Actions read, so it cannot approve fork runs. The push allowlist applies to release/* only.
  • Layers against a pull request that removes its own gate. The ADR does not restate rules that live in full elsewhere; it names each layer in one sentence and links to the rule's home. The secrets layer: one workflow may reference each secret, held by CODEOWNERS review; the rule lives in .gitea/workflows/AGENTS.md. Do not name the secrets. A script that decides whether a pull request's own diff is allowed runs from main's copy, called from a workflow that only the maintainer can change (CODEOWNERS); a script that checks content or the built artefact runs from the pull request's copy, and CODEOWNERS review covers edits to it. Committed skills and agents (.claude/) are agent instructions and are owned like AGENTS.md, because a skill can grant itself tools, run shell commands and register hooks without a trust prompt. The local-run layer: review the hook and script changes of a branch you did not write before running it; the rule lives in docs/contributing/reviewing.md.
  • What is not done, each with its reason.
  • The rule that every accepted risk is written down with its trigger and planned reduction. The register is the SECURITY.md "Accepted risks" section; later decisions add entries there, not to the ADR.

"Held by" values in the ADR: control (naming the check), review, aspirational. "Agent instruction" is a place a rule lives, not a held-by value.

Accepted risks register (SECURITY.md, "Accepted risks")

One entry per risk: risk, why accepted, trigger, planned reduction. No infrastructure detail (no hostnames, runner names, account names or secret names). Entries from this issue:

  1. Prompt injection of an unattended agent. Unattended agents act from the write agent account, so injected text can steer one into pushing a branch whose workflow reads every secret this repository's workflows can reach, before any review. Small today because registration is closed and the maintainer creates every account. Accepted, with no planned reduction for now. Triggers, the two moments to decide again: an account the maintainer did not create can write issues or comments (or a first suspected injection); the release bot's secret is stored. Cheap measure: an unattended agent acts only on Status/Ready for Agent issues opened by the maintainer, a trusted contributor or an agent account, never adds that label itself, and treats issue text as data (rule home: docs/agents/issue-tracker.md).
  2. Every write-capable token reaches the secrets (see the trust boundary). Trigger to revisit: ephemeral runners, or secrets scoped to environments.
  3. Shared runner. The accepted risk names all three tokens on the runner (image push credential, release bot token, Renovate token) and the path of a root Molecule job planting code in the cached molecule virtualenv and collection cache that later jobs reuse. Do not include a fork job reading a credential, since no fork run is ever approved. The runner is registered for this repository only, never for the organisation; another repository in the organisation (the skills source) runs on a runner sharing no host, Docker daemon, cache or filesystem with it and shares no secret with it; its content reaches this repository only through the content re-check and CODEOWNERS on .claude/. Ephemeral runners are the planned fix and the trigger.
  4. Required checks can be satisfied by a posted commit status. As far as is known, Gitea's required status checks match by context name and do not check that Actions posted them, and the commit status API needs only code write. A leaked bot or agent token could post success for Lint, Build and Molecule on its own branch. Not tested on this server. Listed under "a compromised bot or agent token: cheap measures only".
  5. Agent-side hooks are a convenience, not a control. They bind only Claude Code and can be switched off locally, so server-side controls (branch protection, CI) hold the rules.
  6. Release assets and tags. Any writer on Releases can replace a release asset, and the release bot can delete and recreate v* tags (Gitea checks create and delete with one permission). The tag message's sha256 catches a swap by any writer except the release bot, so a leaked release-bot token can replace a release unreviewed. Accepted; no artifact signing. Consumers who need more pin the git route to a commit (stated in the README). This is the reason tag protection alone does not guard releases once a release token exists.
  7. Release tarball file modes. The release tag's MANIFEST.json hash covers every file's content and the Collection metadata, but not file modes. A writer who swaps the release tarball can change a file's exec bit without being detected. Accepted because the Collection ships roles only.
  8. A push onto a Renovate pull request that has a scheduled merge. A writer can add a version-shaped change to it, and it merges as the Renovate bot. Bounded by the bot-diff gate (shape, not value) and by code-owner approval, which a push dismisses. Accepted because every account that can push there already reaches every secret. Trigger to revisit: a token that can push here but cannot reach the secrets. There is no renovate/* push allowlist.

Acceptance

  • Follows the ADR rules from Public design contract replacing the ADR 0004 references:
    • status accepted, set on the maintainer's approval of its pull request (confirmed by the maintainer); docs/adr/ is under CODEOWNERS, so that approval is a control;
    • one screen;
    • context, decision and reason first;
    • the residual-risk section is met by the accepted-risks rule plus the SECURITY.md register;
    • no infrastructure detail: no hostnames, runner names, account names or secret names.
  • Stands alone: no reference outside this repository.
  • Covered by REUSE.toml; the pre-commit hooks pass.

Notes

Measures go in as one-line targets, not as how-to. CODEOWNERS and zizmor have their own issues.

Spec: [Threat model: what we defend against and what we accept](https://git.rkdr.net/Mortis/Kamino/issues/99) (resolution comment), as changed by [Where the maintainer's own procedures live, and what "held by review" means for them](https://git.rkdr.net/Mortis/Kamino/issues/250) and the decisions named below. ## What Write `docs/adr/0001-threat-model.md`, which records the stance only, and add an "Accepted risks" section to `SECURITY.md`, which holds the register. The ADR has these sections: - **Actors and how far each is defended.** The actor table has one fork/AGit actor, the outsider: a human closes the pull request without approving its runs and points to issues; it is never approved or merged. Another actor: instructions injected through issue, pull request or repository text an agent reads. - **Assets in priority order.** - **Trust boundary.** One line names the two positions: a trusted contributor has write access and the secrets; an outsider's fork or AGit pull request is closed, never approved. Write access to this repository is access to its secrets. Least privilege limits a token's API scope and merge rights, not its reach to this repository's secrets: every write-capable token (humans, the agent account, Renovate, the release bot) can push a branch workflow that reads them. Secrets are at repository level when a second repository joins the organisation. Say "every secret this repository's workflows can reach". When a writer is removed, or any write-capable token leaks, the maintainer rotates every repository secret; the rotation list lives in `docs/contributing/maintaining.md`, not in the ADR. - **Least-privilege target for tokens**, as one-line targets, not how-to. Each agent account has exactly one accountable person, named in its Gitea profile, and sits in a team with Actions read, so it cannot approve fork runs. The push allowlist applies to `release/*` only. - **Layers against a pull request that removes its own gate.** The ADR does not restate rules that live in full elsewhere; it names each layer in one sentence and links to the rule's home. The secrets layer: one workflow may reference each secret, held by CODEOWNERS review; the rule lives in `.gitea/workflows/AGENTS.md`. Do not name the secrets. A script that decides whether a pull request's own diff is allowed runs from `main`'s copy, called from a workflow that only the maintainer can change (CODEOWNERS); a script that checks content or the built artefact runs from the pull request's copy, and CODEOWNERS review covers edits to it. Committed skills and agents (`.claude/`) are agent instructions and are owned like `AGENTS.md`, because a skill can grant itself tools, run shell commands and register hooks without a trust prompt. The local-run layer: review the hook and script changes of a branch you did not write before running it; the rule lives in `docs/contributing/reviewing.md`. - **What is not done, each with its reason.** - **The rule that every accepted risk is written down with its trigger and planned reduction.** The register is the `SECURITY.md` "Accepted risks" section; later decisions add entries there, not to the ADR. "Held by" values in the ADR: control (naming the check), review, aspirational. "Agent instruction" is a place a rule lives, not a held-by value. ## Accepted risks register (`SECURITY.md`, "Accepted risks") One entry per risk: risk, why accepted, trigger, planned reduction. No infrastructure detail (no hostnames, runner names, account names or secret names). Entries from this issue: 1. **Prompt injection of an unattended agent.** Unattended agents act from the write agent account, so injected text can steer one into pushing a branch whose workflow reads every secret this repository's workflows can reach, before any review. Small today because registration is closed and the maintainer creates every account. Accepted, with no planned reduction for now. Triggers, the two moments to decide again: an account the maintainer did not create can write issues or comments (or a first suspected injection); the release bot's secret is stored. Cheap measure: an unattended agent acts only on `Status/Ready for Agent` issues opened by the maintainer, a trusted contributor or an agent account, never adds that label itself, and treats issue text as data (rule home: `docs/agents/issue-tracker.md`). 2. **Every write-capable token reaches the secrets** (see the trust boundary). Trigger to revisit: ephemeral runners, or secrets scoped to environments. 3. **Shared runner.** The accepted risk names all three tokens on the runner (image push credential, release bot token, Renovate token) and the path of a root Molecule job planting code in the cached molecule virtualenv and collection cache that later jobs reuse. Do not include a fork job reading a credential, since no fork run is ever approved. The runner is registered for this repository only, never for the organisation; another repository in the organisation (the skills source) runs on a runner sharing no host, Docker daemon, cache or filesystem with it and shares no secret with it; its content reaches this repository only through the content re-check and CODEOWNERS on `.claude/`. Ephemeral runners are the planned fix and the trigger. 4. **Required checks can be satisfied by a posted commit status.** As far as is known, Gitea's required status checks match by context name and do not check that Actions posted them, and the commit status API needs only code write. A leaked bot or agent token could post `success` for Lint, Build and Molecule on its own branch. Not tested on this server. Listed under "a compromised bot or agent token: cheap measures only". 5. **Agent-side hooks are a convenience, not a control.** They bind only Claude Code and can be switched off locally, so server-side controls (branch protection, CI) hold the rules. 6. **Release assets and tags.** Any writer on Releases can replace a release asset, and the release bot can delete and recreate `v*` tags (Gitea checks create and delete with one permission). The tag message's sha256 catches a swap by any writer except the release bot, so a leaked release-bot token can replace a release unreviewed. Accepted; no artifact signing. Consumers who need more pin the git route to a commit (stated in the README). This is the reason tag protection alone does not guard releases once a release token exists. 7. **Release tarball file modes.** The release tag's `MANIFEST.json` hash covers every file's content and the Collection metadata, but not file modes. A writer who swaps the release tarball can change a file's exec bit without being detected. Accepted because the Collection ships roles only. 8. **A push onto a Renovate pull request that has a scheduled merge.** A writer can add a version-shaped change to it, and it merges as the Renovate bot. Bounded by the bot-diff gate (shape, not value) and by code-owner approval, which a push dismisses. Accepted because every account that can push there already reaches every secret. Trigger to revisit: a token that can push here but cannot reach the secrets. There is no `renovate/*` push allowlist. ## Acceptance - Follows the ADR rules from [Public design contract replacing the ADR 0004 references](https://git.rkdr.net/Mortis/Kamino/issues/92): - status `accepted`, set on the maintainer's approval of its pull request (confirmed by the maintainer); `docs/adr/` is under CODEOWNERS, so that approval is a control; - one screen; - context, decision and reason first; - the residual-risk section is met by the accepted-risks rule plus the `SECURITY.md` register; - no infrastructure detail: no hostnames, runner names, account names or secret names. - Stands alone: no reference outside this repository. - Covered by `REUSE.toml`; the pre-commit hooks pass. ## Notes Measures go in as one-line targets, not as how-to. CODEOWNERS and zizmor have their own issues.
Claude added the
Status
Ready for Agent
label 2026-11-14 22:32:29 +00:00
Author
Owner

Addition from How friends get code in: in the trust boundary section, add one line naming the three positions. A trusted contributor has write access and the secrets. A friend works from a fork whose every push the maintainer or a trusted contributor approves. An outsider's fork pull request is closed, never approved, until ephemeral runners exist.

Addition from [How friends get code in](https://git.rkdr.net/Mortis/Kamino/issues/100): in the trust boundary section, add one line naming the three positions. A trusted contributor has write access and the secrets. A friend works from a fork whose every push the maintainer or a trusted contributor approves. An outsider's fork pull request is closed, never approved, until ephemeral runners exist.
Author
Owner

Input from Enforcement map for each prose-only rule: add one sentence to the ADR. "A script that decides whether a pull request's own diff is allowed runs from main's copy; a script that checks content or the built artefact runs from the pull request's copy, and CODEOWNERS review covers edits to it."

Input from [Enforcement map for each prose-only rule](https://git.rkdr.net/Mortis/Kamino/issues/102): add one sentence to the ADR. "A script that decides whether a pull request's own diff is allowed runs from `main`'s copy; a script that checks content or the built artefact runs from the pull request's copy, and CODEOWNERS review covers edits to it."
Author
Owner

Addition from Recommended repository settings and branch protection: the secrets stay at organisation level, so the trust boundary is organisation-wide. Add one line to the ADR: write access to any repository in the organisation is secret access to all of them; granting write anywhere in the organisation is granting this repository's secrets.

Addition from [Recommended repository settings and branch protection](https://git.rkdr.net/Mortis/Kamino/issues/179): the secrets stay at organisation level, so the trust boundary is organisation-wide. Add one line to the ADR: **write access to any repository in the organisation is secret access to all of them**; granting write anywhere in the organisation is granting this repository's secrets.
Author
Owner

Addition from Agent guard hook and permission allowlist, for the accepted list: agent-side hooks are a convenience, not a control; they bind only Claude Code and can be switched off locally, so server-side controls (branch protection, CI) hold the rules.

Addition from [Agent guard hook and permission allowlist](https://git.rkdr.net/Mortis/Kamino/issues/195), for the accepted list: agent-side hooks are a convenience, not a control; they bind only Claude Code and can be switched off locally, so server-side controls (branch protection, CI) hold the rules.
Claude added this to the Open to contributors milestone 2026-11-15 22:21:19 +00:00
Author
Owner

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

  • The secrets rule in the spec is outdated. The resolution of Threat model: what we defend against and what we accept says "only image.yml and renovate.yml may reference secrets". The planned release.yml adds a third. No comment here carries the restated rule from Enforcement map for each prose-only rule. Change: write it in the ADR as "each secret is referenced by exactly one workflow; no other workflow references a secret except the job token", held by CODEOWNERS review. Do not name the secrets (no infrastructure detail).
  • "Judge scripts run from main's copy" holds only through CODEOWNERS on the calling workflow. The base copy is fetched by a step in the pull request's own workflow file (.gitea/workflows/lint.yml:102-118, .gitea/workflows/molecule.yml:166-178). A pull request that deletes that step still gets a green Lint, and only code-owner review on .gitea/ stops the merge. Change the sentence from the second comment to: "...runs from main's copy, called from a workflow that only the maintainer can change (CODEOWNERS)".
  • Required checks can be satisfied by a posted commit status. As far as is known, Gitea's required status checks match by context name and do not check that Actions posted them, and the commit status API needs only code write. A leaked bot or agent token could post success for Lint, Build and Molecule on its own branch. This was not tested on this server. Change: add it to the accepted risks, under "a compromised bot or agent token: cheap measures only".
  • The rule for running a branch locally misses agent files. The resolution says: "review an unmerged branch's hook and script changes before running them locally". A branch's .claude/ settings, hooks and skills, and its AGENTS.md files, also take effect when a contributor opens that branch with an agent. Change: name .pre-commit-config.yaml, .claude/ and every AGENTS.md in the rule, and suggest reviewing a friend's branch in the web diff, or in a clone where no agent runs.

Waiting on other decisions: the friend tier and approval wording wait on The friend boundary once the approval facts are known; what agent tokens may do waits on Agent credentials and what unattended agents can do; where secrets live and what CODEOWNERS covers wait on Code-owner approval against Renovate automerge, and where secrets live.

Review of the map (2026-11-15): corrections to this issue. - **The secrets rule in the spec is outdated.** The resolution of [Threat model: what we defend against and what we accept](https://git.rkdr.net/Mortis/Kamino/issues/99) says "only `image.yml` and `renovate.yml` may reference secrets". The planned `release.yml` adds a third. No comment here carries the restated rule from [Enforcement map for each prose-only rule](https://git.rkdr.net/Mortis/Kamino/issues/102). Change: write it in the ADR as "each secret is referenced by exactly one workflow; no other workflow references a secret except the job token", held by CODEOWNERS review. Do not name the secrets (no infrastructure detail). - **"Judge scripts run from `main`'s copy" holds only through CODEOWNERS on the calling workflow.** The base copy is fetched by a step in the pull request's own workflow file (`.gitea/workflows/lint.yml:102-118`, `.gitea/workflows/molecule.yml:166-178`). A pull request that deletes that step still gets a green Lint, and only code-owner review on `.gitea/` stops the merge. Change the sentence from the second comment to: "...runs from `main`'s copy, called from a workflow that only the maintainer can change (CODEOWNERS)". - **Required checks can be satisfied by a posted commit status.** As far as is known, Gitea's required status checks match by context name and do not check that Actions posted them, and the commit status API needs only code write. A leaked bot or agent token could post `success` for Lint, Build and Molecule on its own branch. This was not tested on this server. Change: add it to the accepted risks, under "a compromised bot or agent token: cheap measures only". - **The rule for running a branch locally misses agent files.** The resolution says: "review an unmerged branch's hook and script changes before running them locally". A branch's `.claude/` settings, hooks and skills, and its `AGENTS.md` files, also take effect when a contributor opens that branch with an agent. Change: name `.pre-commit-config.yaml`, `.claude/` and every `AGENTS.md` in the rule, and suggest reviewing a friend's branch in the web diff, or in a clone where no agent runs. Waiting on other decisions: the friend tier and approval wording wait on [The friend boundary once the approval facts are known](https://git.rkdr.net/Mortis/Kamino/issues/205); what agent tokens may do waits on [Agent credentials and what unattended agents can do](https://git.rkdr.net/Mortis/Kamino/issues/209); where secrets live and what CODEOWNERS covers wait on [Code-owner approval against Renovate automerge, and where secrets live](https://git.rkdr.net/Mortis/Kamino/issues/210).
Author
Owner

Scope from The friend boundary once the approval facts are known, points 2 and 5:

  • One line on friends: their pushes run only after approval until their first pull request is merged here; after that Gitea runs them unapproved, still without secrets and with a read-only token. Accepted because the model defends against mistakes first.
  • The accepted shared-runner risk names all three tokens on the runner (image push credential, release bot token, Renovate token) and both paths: a fork job reading a credential live beside image.yml at capacity 2, and a root Molecule job planting code in the cached molecule virtualenv and collection cache that later jobs reuse. Ephemeral runners stay the named fix and trigger.
Scope from [The friend boundary once the approval facts are known](https://git.rkdr.net/Mortis/Kamino/issues/205), points 2 and 5: - One line on friends: their pushes run only after approval until their first pull request is merged here; after that Gitea runs them unapproved, still without secrets and with a read-only token. Accepted because the model defends against mistakes first. - The accepted shared-runner risk names all three tokens on the runner (image push credential, release bot token, Renovate token) and both paths: a fork job reading a credential live beside `image.yml` at capacity 2, and a root Molecule job planting code in the cached molecule virtualenv and collection cache that later jobs reuse. Ephemeral runners stay the named fix and trigger.
Author
Owner

Scope added by Committed skills as agent instructions: ownership, updates and required tools: one line in ADR 0001. Committed skills and agents (.claude/) are agent instructions and are owned like AGENTS.md, because a skill can grant itself tools, run shell commands and register hooks without a trust prompt.

Scope added by [Committed skills as agent instructions: ownership, updates and required tools](https://git.rkdr.net/Mortis/Kamino/issues/208): one line in ADR 0001. Committed skills and agents (`.claude/`) are agent instructions and are owned like `AGENTS.md`, because a skill can grant itself tools, run shell commands and register hooks without a trust prompt.
Author
Owner

Scope added by Agent credentials and what unattended agents can do (resolution 6 and 1):

  • Actor: instructions injected through issue, pull request or repository text an agent reads.
  • Accepted risk: unattended agents act from the write agent account, so injected text can steer one into pushing a branch whose workflow reads every organisation secret before any review. Small today because registration is closed and the maintainer creates every account.
  • Trigger: before any account the maintainer did not create can write issues or comments, or after a first suspected injection, whichever comes first.
  • Planned reduction: a separate Restricted account without write for unattended agents; its pushes run as fork pull requests (no secrets, read-only token) and Restricted accounts are always asked for approval (Gitea 28.0.0 source, not tested live).
  • Agent accounts: each has exactly one accountable person, named in its Gitea profile; agent accounts sit in a team with Actions read, so they cannot approve fork runs.
Scope added by [Agent credentials and what unattended agents can do](https://git.rkdr.net/Mortis/Kamino/issues/209) (resolution 6 and 1): - **Actor:** instructions injected through issue, pull request or repository text an agent reads. - **Accepted risk:** unattended agents act from the write agent account, so injected text can steer one into pushing a branch whose workflow reads every organisation secret before any review. Small today because registration is closed and the maintainer creates every account. - **Trigger:** before any account the maintainer did not create can write issues or comments, or after a first suspected injection, whichever comes first. - **Planned reduction:** a separate Restricted account without write for unattended agents; its pushes run as fork pull requests (no secrets, read-only token) and Restricted accounts are always asked for approval (Gitea 28.0.0 source, not tested live). - **Agent accounts:** each has exactly one accountable person, named in its Gitea profile; agent accounts sit in a team with Actions read, so they cannot approve fork runs.
Author
Owner

Scope added by Code-owner approval against Renovate automerge, and where secrets live (resolution, points 5 and 7):

  • Sharpen "write access is secret access" (do not add a second statement): least privilege limits a token's API scope and merge rights, not its reach to this repository's secrets. Every write-capable token (humans, the agent account, Renovate, the release bot) can push a branch workflow that reads them. Accepted risk; trigger to revisit: ephemeral runners, or secrets scoped to environments.
  • One line: when a writer is removed, or any write-capable token leaks, the maintainer rotates every repository secret. The rotation list (each secret and where it is issued) lives in the maintainer's contributor doc, not in the ADR.
Scope added by [Code-owner approval against Renovate automerge, and where secrets live](https://git.rkdr.net/Mortis/Kamino/issues/210) (resolution, points 5 and 7): - Sharpen "write access is secret access" (do not add a second statement): least privilege limits a token's API scope and merge rights, not its reach to this repository's secrets. Every write-capable token (humans, the agent account, Renovate, the release bot) can push a branch workflow that reads them. Accepted risk; trigger to revisit: ephemeral runners, or secrets scoped to environments. - One line: when a writer is removed, or any write-capable token leaks, the maintainer rotates every repository secret. The rotation list (each secret and where it is issued) lives in the maintainer's contributor doc, not in the ADR.
Author
Owner

Scope added by Release path: fragment check, failed publish and tarball integrity: a residual-risk line. Any writer on Releases can replace a release asset, and the release bot can delete and recreate v* tags (Gitea checks create and delete with one permission). The tag message's sha256 catches a swap by any writer except the release bot, so a leaked release-bot token can replace a release unreviewed. Accepted; no artifact signing. Consumers who need more pin the git route to a commit (stated in the README).

Scope added by [Release path: fragment check, failed publish and tarball integrity](https://git.rkdr.net/Mortis/Kamino/issues/211): a residual-risk line. Any writer on Releases can replace a release asset, and the release bot can delete and recreate `v*` tags (Gitea checks create and delete with one permission). The tag message's sha256 catches a swap by any writer except the release bot, so a leaked release-bot token can replace a release unreviewed. Accepted; no artifact signing. Consumers who need more pin the git route to a commit (stated in the README).
Author
Owner

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

Three lines of this spec are superseded by later comments without saying so, and two things are open.

  • Friends. The first comment says "A friend works from a fork whose every push the maintainer or a trusted contributor approves". The sixth replaces it: pushes run after approval until the friend's first pull request is merged here. Write only the later line. In the actor table, write two rows instead of "An outsider using a fork | The approval click, asked again on every push": a friend's fork (approved until the first merged pull request, the approver reads the whole diff, no secrets and a read-only token) and an outsider's fork (closed by a human, never approved). Decisions: How friends get code in, The friend boundary once the approval facts are known.
  • Secrets. The third comment says "the secrets stay at organisation level ... write access to any repository in the organisation is secret access to all of them", and the eighth says an injected agent "reads every organisation secret". Code-owner approval against Renovate automerge, and where secrets live, point 4, moves them to repository level. Write: write access to this repository is access to its secrets; until the secrets move, that holds for any repository in the organisation. And: "every secret this repository's workflows can reach".
  • Release token. "Tag protection already guards releases" and "consumers install from a protected tag" need the reason that still holds once a release token exists. Use the residual-risk line from Release path: fragment check, failed publish and tarball integrity. What the tag message's checksum proves is open in What the tarball checksum in the tag message proves when a publish is repaired.
  • Open: "The rotation list ... lives in the maintainer's contributor doc" names a file no decision creates. The acceptance "one screen" cannot be met with ten scope comments. Whether the status is set "on the maintainer's merge" (the body) or on the maintainer's approval (a review correction) was not confirmed by the maintainer. All three are in Where the maintainer's own procedures live, and what "held by review" means for them.
  • Open: the organisation runner serves every repository of the organisation; only the secrets were decided. See What a second repository in the organisation shares besides secrets.

Changed: this issue is now blocked by the ticket on the maintainer's procedures.

Proposed, not done: after that ticket closes, rewrite the body once as the full section list in final wording.

Review of the map (2026-11-17). Three lines of this spec are superseded by later comments without saying so, and two things are open. - **Friends.** The first comment says "A friend works from a fork whose every push the maintainer or a trusted contributor approves". The sixth replaces it: pushes run after approval until the friend's first pull request is merged here. Write only the later line. In the actor table, write two rows instead of "An outsider using a fork | The approval click, asked again on every push": a friend's fork (approved until the first merged pull request, the approver reads the whole diff, no secrets and a read-only token) and an outsider's fork (closed by a human, never approved). Decisions: [How friends get code in](https://git.rkdr.net/Mortis/Kamino/issues/100), [The friend boundary once the approval facts are known](https://git.rkdr.net/Mortis/Kamino/issues/205). - **Secrets.** The third comment says "the secrets stay at organisation level ... write access to any repository in the organisation is secret access to all of them", and the eighth says an injected agent "reads every organisation secret". [Code-owner approval against Renovate automerge, and where secrets live](https://git.rkdr.net/Mortis/Kamino/issues/210), point 4, moves them to repository level. Write: write access to this repository is access to its secrets; until the secrets move, that holds for any repository in the organisation. And: "every secret this repository's workflows can reach". - **Release token.** "Tag protection already guards releases" and "consumers install from a protected tag" need the reason that still holds once a release token exists. Use the residual-risk line from [Release path: fragment check, failed publish and tarball integrity](https://git.rkdr.net/Mortis/Kamino/issues/211). What the tag message's checksum proves is open in [What the tarball checksum in the tag message proves when a publish is repaired](https://git.rkdr.net/Mortis/Kamino/issues/255). - **Open:** "The rotation list ... lives in the maintainer's contributor doc" names a file no decision creates. The acceptance "one screen" cannot be met with ten scope comments. Whether the status is set "on the maintainer's merge" (the body) or on the maintainer's approval (a review correction) was not confirmed by the maintainer. All three are in [Where the maintainer's own procedures live, and what "held by review" means for them](https://git.rkdr.net/Mortis/Kamino/issues/250). - **Open:** the organisation runner serves every repository of the organisation; only the secrets were decided. See [What a second repository in the organisation shares besides secrets](https://git.rkdr.net/Mortis/Kamino/issues/249). Changed: this issue is now blocked by the ticket on the maintainer's procedures. Proposed, not done: after that ticket closes, rewrite the body once as the full section list in final wording.
Author
Owner

Scope added by Pushes onto a pull request that has a scheduled merge (resolution, point 6). One residual-risk line:

  • A writer can add a version-shaped change to a Renovate pull request that has a scheduled merge, and it merges as the Renovate bot. Bounded by the bot-diff gate (shape, not value) and by code-owner approval, which a push dismisses. Accepted because every account that can push there already reaches every secret. Trigger to revisit: a token that can push here but cannot reach the secrets.

This withdraws the renovate/* push allowlist from the Code-owner approval against Renovate automerge, and where secrets live line; release/* keeps its allowlist.

Scope added by [Pushes onto a pull request that has a scheduled merge](https://git.rkdr.net/Mortis/Kamino/issues/248) (resolution, point 6). One residual-risk line: - A writer can add a version-shaped change to a Renovate pull request that has a scheduled merge, and it merges as the Renovate bot. Bounded by the bot-diff gate (shape, not value) and by code-owner approval, which a push dismisses. Accepted because every account that can push there already reaches every secret. Trigger to revisit: a token that can push here but cannot reach the secrets. This withdraws the `renovate/*` push allowlist from the [Code-owner approval against Renovate automerge, and where secrets live](https://git.rkdr.net/Mortis/Kamino/issues/210) line; `release/*` keeps its allowlist.
Author
Owner

Scope added by What a second repository in the organisation shares besides secrets

One line, narrowing the shared-runner accepted risk: the runner is registered for this repository only, never for the organisation; another repository in the organisation (the skills source) runs on a runner sharing no host, Docker daemon, cache or filesystem with it and shares no secret with it; its content reaches this repository only through the content re-check and CODEOWNERS on .claude/.

## Scope added by [What a second repository in the organisation shares besides secrets](https://git.rkdr.net/Mortis/Kamino/issues/249) One line, narrowing the shared-runner accepted risk: the runner is registered for this repository only, never for the organisation; another repository in the organisation (the skills source) runs on a runner sharing no host, Docker daemon, cache or filesystem with it and shares no secret with it; its content reaches this repository only through the content re-check and CODEOWNERS on `.claude/`.
Author
Owner

Scope change from Where the maintainer's own procedures live, and what "held by review" means for them (2026-11-20)

This answers the three open points of the review comment of 2026-11-17.

  • The ADR records only the stance: actors and how far each is defended, the trust boundary, write access is secret access, what is deliberately not done and why, and the rule that every accepted risk is written down with its trigger and planned reduction. With that, the "one screen" acceptance can be met.
  • The accepted-risk register moves to a new "Accepted risks" section of SECURITY.md, in this issue's scope: one entry per risk (risk, why accepted, trigger, planned reduction; no infrastructure detail). Every accepted risk added by the comments above goes there, not into the ADR. Later decisions add entries there, not to the ADR. The acceptance item "a residual-risk section" is met by the rule above plus the register.
  • Friend rows go. The actor table has one fork/AGit actor, the outsider: a human closes the pull request without approving its runs and points to issues; it is never approved or merged. Drop the line "pushes run after approval until the first merged pull request" (first and sixth comments, and the two-row version in the review comment). The "approval until first merged pull request" accepted risk goes. The shared-runner risk's path "a fork job reading a credential live beside image.yml" relied on approved fork runs; reword that entry accordingly in the register.
  • Rotation: the ADR keeps its one line (rotate every secret when a writer is removed or a write-capable token leaks). The rotation list lives in docs/contributing/maintaining.md (the maintaining.md issue filed from #250), not in the ADR.
  • Status: accepted on the maintainer's approval of its pull request, which sets accepted (confirmed by the maintainer). docs/adr/ is under CODEOWNERS, so that approval is a control.
  • Held-by vocabulary: control (naming the check), review, aspirational. "Agent instruction" is a place a rule lives, not a held-by value.
  • Local-run rule (review comment of 2026-11-16): "a friend's branch" becomes "a branch you did not write", including an outsider's change a trusted contributor carries into their own pull request.
  • Open, not decided by #250: the planned reduction from Agent credentials and what unattended agents can do (a Restricted account whose pushes run as fork pull requests) does not fit "a fork or AGit pull request always comes from an outsider and is closed", nor "no Restricted accounts". Left for the maintainer.
## Scope change from [Where the maintainer's own procedures live, and what "held by review" means for them](https://git.rkdr.net/Mortis/Kamino/issues/250) (2026-11-20) This answers the three open points of the review comment of 2026-11-17. - **The ADR records only the stance:** actors and how far each is defended, the trust boundary, write access is secret access, what is deliberately not done and why, and the rule that every accepted risk is written down with its trigger and planned reduction. With that, the "one screen" acceptance can be met. - **The accepted-risk register moves to a new "Accepted risks" section of `SECURITY.md`**, in this issue's scope: one entry per risk (risk, why accepted, trigger, planned reduction; no infrastructure detail). Every accepted risk added by the comments above goes there, not into the ADR. Later decisions add entries there, not to the ADR. The acceptance item "a residual-risk section" is met by the rule above plus the register. - **Friend rows go.** The actor table has one fork/AGit actor, the outsider: a human closes the pull request without approving its runs and points to issues; it is never approved or merged. Drop the line "pushes run after approval until the first merged pull request" (first and sixth comments, and the two-row version in the review comment). The "approval until first merged pull request" accepted risk goes. The shared-runner risk's path "a fork job reading a credential live beside `image.yml`" relied on approved fork runs; reword that entry accordingly in the register. - **Rotation:** the ADR keeps its one line (rotate every secret when a writer is removed or a write-capable token leaks). The rotation list lives in `docs/contributing/maintaining.md` (the maintaining.md issue filed from #250), not in the ADR. - **Status:** accepted on the maintainer's approval of its pull request, which sets `accepted` (confirmed by the maintainer). `docs/adr/` is under CODEOWNERS, so that approval is a control. - **Held-by vocabulary:** control (naming the check), review, aspirational. "Agent instruction" is a place a rule lives, not a held-by value. - **Local-run rule (review comment of 2026-11-16):** "a friend's branch" becomes "a branch you did not write", including an outsider's change a trusted contributor carries into their own pull request. - **Open, not decided by #250:** the planned reduction from [Agent credentials and what unattended agents can do](https://git.rkdr.net/Mortis/Kamino/issues/209) (a Restricted account whose pushes run as fork pull requests) does not fit "a fork or AGit pull request always comes from an outsider and is closed", nor "no Restricted accounts". Left for the maintainer.
Author
Owner

Scope change from Who counts as having set Status/Ready for Agent, and where that rule lives (2026-11-20)

  • The accepted prompt-injection risk (in the SECURITY.md "Accepted risks" register) gets a second trigger: before the kamino-release bot's secret is stored, unattended agents move to the planned Restricted account without write, or stop running unattended. Reason: that secret can tag and publish a release consumers install.
  • Its cheap measure now reads: an unattended agent acts only on Status/Ready for Agent issues opened by the maintainer, a trusted contributor or an agent account, never adds that label itself, and treats issue text as data (rule home: docs/agents/issue-tracker.md).
## Scope change from [Who counts as having set Status/Ready for Agent, and where that rule lives](https://git.rkdr.net/Mortis/Kamino/issues/251) (2026-11-20) - The accepted prompt-injection risk (in the `SECURITY.md` "Accepted risks" register) gets a **second trigger**: before the `kamino-release` bot's secret is stored, unattended agents move to the planned Restricted account without write, or stop running unattended. Reason: that secret can tag and publish a release consumers install. - Its cheap measure now reads: an unattended agent acts only on `Status/Ready for Agent` issues opened by the maintainer, a trusted contributor or an agent account, never adds that label itself, and treats issue text as data (rule home: `docs/agents/issue-tracker.md`).
Author
Owner

From What the tarball checksum in the tag message proves when a publish is repaired (2026-11-20)

Add one entry to the accepted-risks register (in SECURITY.md, per Where the maintainer's own procedures live): the release tag's MANIFEST.json hash covers every file's content and the Collection metadata, but not file modes. A writer who swaps the release tarball can change a file's exec bit without being detected. Accepted because the Collection ships roles only.

## From [What the tarball checksum in the tag message proves when a publish is repaired](https://git.rkdr.net/Mortis/Kamino/issues/255) (2026-11-20) Add one entry to the accepted-risks register (in `SECURITY.md`, per [Where the maintainer's own procedures live](https://git.rkdr.net/Mortis/Kamino/issues/250)): the release tag's `MANIFEST.json` hash covers every file's content and the Collection metadata, but not file modes. A writer who swaps the release tarball can change a file's exec bit without being detected. Accepted because the Collection ships roles only.
Author
Owner

Body rewritten on 2026-11-20 to the final state of the comments above (final validation round of the map, #87 (comment)). The body is the spec; the earlier comments are history.

  • Decision 2: prompt injection of an unattended agent is an accepted risk with no planned reduction for now; the Restricted-account reduction and the "before the release secret is stored" gate are withdrawn; the two triggers stay as the moments to decide again.
  • Two positions only; accepted risks live in the SECURITY.md register (eight entries listed in the body); status accepted on the maintainer's approval of the pull request, docs/adr/ code-owned; push allowlist on release/* only.
Body rewritten on 2026-11-20 to the final state of the comments above (final validation round of the map, https://git.rkdr.net/Mortis/Kamino/issues/87#issuecomment-12281). The body is the spec; the earlier comments are history. - Decision 2: prompt injection of an unattended agent is an accepted risk with no planned reduction for now; the Restricted-account reduction and the "before the release secret is stored" gate are withdrawn; the two triggers stay as the moments to decide again. - Two positions only; accepted risks live in the `SECURITY.md` register (eight entries listed in the body); status `accepted` on the maintainer's approval of the pull request, `docs/adr/` code-owned; push allowlist on `release/*` only.
Author
Owner

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

  • "Layers against a pull request that removes its own gate": the ADR does not restate rules that live in full elsewhere. The secrets rule is now one sentence naming the layer (held by CODEOWNERS review) that links to its home, .gitea/workflows/AGENTS.md; the local-run rule is one sentence linking to docs/contributing/reviewing.md.
  • Nothing else changed.
Final validation round, second pass (2026-11-20): body edited. - "Layers against a pull request that removes its own gate": the ADR does not restate rules that live in full elsewhere. The secrets rule is now one sentence naming the layer (held by CODEOWNERS review) that links to its home, `.gitea/workflows/AGENTS.md`; the local-run rule is one sentence linking to `docs/contributing/reviewing.md`. - Nothing else changed.
Defame1297 was assigned by Claude 2026-11-21 06:46:31 +00:00
Defame1297 removed their assignment 2026-11-21 21:16:38 +00:00
Defame1297 was assigned by Claude 2026-11-21 22:01:39 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#143