Threat model: what we defend against and what we accept #99
Notifications
Due Date
No due date set.
Blocks
Depends on
#100 How friends get code in
Mortis/Kamino
#98 Release automation
Mortis/Kamino
#102 Enforcement map for each prose-only rule
Mortis/Kamino
#89 Test what a fork pull request can do on this Gitea
Mortis/Kamino
Reference: Mortis/Kamino#99
Reference in new issue
Block a user
Part of #87
Question
Against which actors and mistakes does this repository defend, with which cheap measures, and which risks are explicitly accepted? Recorded as this repository's first ADR.
Context
pull_request_targetor stray secret references; the bot-diff guard keys on a branch name.pull_request_targetand secret references, judge scripts run from the base branch.Resolution (2026-11-14)
Built on Test what a fork pull request can do on this Gitea and Record current repository settings and branch protection. Recorded as this repository's first ADR,
docs/adr/0001-threat-model.md(filed below). The ADR follows the ADR rules from Public design contract replacing the ADR 0004 references: one screen, a residual-risk section, no infrastructure detail.Actors
Assets, in priority order
mainand thev*tags.dev-setup.shand hook revisions from a branch run locally when someone checks that branch out.Trust boundary
Write access is secret access. Anyone who can push a branch can run their own workflow, read every organisation secret and run as root on the runner, all before any review. Branch protection controls what merges, never what runs. So write access goes only to people trusted with the secrets; everyone else contributes through a fork. Consequence for How friends get code in.
Targets and measures
.gitea/**,scripts/**,renovate.json,.pre-commit-config.yaml,requirements*,galaxy.ymlanddocs/adr/**, all assigned to the maintainer. Ordinary role changes stay self-mergeable.main's copy, as bot-diff and molecule selection already do. Rule: every new judge script does the same.image.ymlandrenovate.ymlmay reference secrets. CODEOWNERS puts every workflow change in front of the maintainer; there is no custom grep.pull_request_targetand${{ }}inrun:. Adopted as a pre-commit hook, withfiles:overridden to.gitea/workflowsand the revision pinned by SHA. Condition: it must fit theciimage under the 100 MB layer limit. If the hook's own environment does not fit, zizmor goes intorequirements-devas alanguage: systemhook.Accepted risks
renovate/…only gets stricter checks. The real risk is the bot's token, covered by least privilege.Not done
Not verified
files:override. It was only run directly.Review of the map (2026-11-17).
Partly superseded by How friends get code in and The friend boundary once the approval facts are known: an outsider's fork pull request is closed by a human, never approved. A friend's pushes are approved until the friend's first merged pull request, and the approver reads the whole diff.
Partly superseded by Enforcement map for each prose-only rule: the secrets rule is "each secret is referenced by exactly one workflow".
Partly superseded by Code-owner approval against Renovate automerge, and where secrets live: CODEOWNERS is a root file that owns itself, it owns more gate inputs, and the three pin files are not owned.
Added by Agent credentials and what unattended agents can do: prompt injection as an actor and an accepted risk. Added by Release path: fragment check, failed publish and tarball integrity: the tag message carries the tarball's sha256; still no artifact signing. The current text is the scope of docs(adr): record the threat model as ADR 0001.