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

Merged
Defame1297 merged 3 commits from docs/143-threat-model-adr into main 2026-11-21 22:40:56 +00:00
Owner

Closes #143

What

  • docs/adr/0001-threat-model.md records the stance only:

    • actors and how far each is defended;
    • assets in priority order;
    • the trust boundary: two positions, write access is secret access, every write-capable token reaches the secrets, rotation on a removed writer or a leaked token;
    • least-privilege targets;
    • the layers against a pull request that removes its own control, each with its held-by;
    • what is not done;
    • the rule that every accepted risk is written down.

    Status is accepted, set by the maintainer's approval of this pull request.

  • SECURITY.md gets an "Accepted risks" register with the eight entries from the issue body. Each gives the risk, why it's accepted, the trigger and the planned reduction.

Choices made where the body left room

  • Links to files that don't exist yet, made as the spec says:

    • .gitea/workflows/AGENTS.md (#182)
    • docs/contributing/maintaining.md (#262)
    • docs/contributing/reviewing.md (#189)
    • docs/agents/issue-tracker.md exists, but the issue-text-is-data rule arrives with #230.

    No link check runs yet, so these links are dead until those issues land.

  • Shared-runner entry worded as targets. Whether the runner is registered for this repository only, and how the skills-source repository runs, could not be checked from here. Both are written as "is to be". Change them to plain statements if they already hold.

  • Entry 6 drops "(stated in the README)". The README says "Pin a tag, never a branch" and has nothing on pinning to a commit. That line belongs with the release-path work, not this pull request.

  • Entries with no trigger or reduction in the spec (4, 5, 7) say "none; accepted as is". Nothing was invented for them.

  • "Control" instead of "gate" and "guard", following GLOSSARY.md's "Avoid" list. "bot-diff gate" stays because it is the check's name.

  • The secrets layer reads "may be referenced by one workflow only", which matches the spec's "one workflow may reference each secret" (at most one).

Found and not changed

  • GLOSSARY.md still defines Friend, which contradicts the two positions here. I found no open issue for it; it needs its own.
  • CONTRIBUTING.md still describes organisation-level secrets.

Verified

  • Pre-commit hooks pass on every commit: REUSE, gitleaks, Conventional Commits. The pre-push ansible-test sanity passes.
  • Two review rounds by subagents: Standards and Spec in parallel, then a combined re-check. Their findings are fixed in commits 2 and 3, apart from the README line and the known forward links.
  • A grep finds no hostnames, runner names, account names or secret names, and no mention of other repositories. The only hit was the existing security@ contact.
  • Relative links and the SECURITY.md#accepted-risks anchor resolve, apart from the forward links above.
  • Neither file is in the Collection (docs and SECURITY.md are in build_ignore), so there is no changelog fragment.

Not verified

  • How Gitea renders the pages, including whether the anchor link jumps.
  • "One screen": the ADR is 74 lines, most of it the actor table and the layers the spec requires.
  • Whether code-owner approval is enforced yet (#192).
  • The untested commit-status claim in entry 4, stated as untested.

🤖 Generated with Claude Code

Closes #143 ## What - `docs/adr/0001-threat-model.md` records the stance only: - actors and how far each is defended; - assets in priority order; - the trust boundary: two positions, write access is secret access, every write-capable token reaches the secrets, rotation on a removed writer or a leaked token; - least-privilege targets; - the layers against a pull request that removes its own control, each with its held-by; - what is not done; - the rule that every accepted risk is written down. Status is `accepted`, set by the maintainer's approval of this pull request. - `SECURITY.md` gets an "Accepted risks" register with the eight entries from the issue body. Each gives the risk, why it's accepted, the trigger and the planned reduction. ## Choices made where the body left room - **Links to files that don't exist yet, made as the spec says:** - `.gitea/workflows/AGENTS.md` (#182) - `docs/contributing/maintaining.md` (#262) - `docs/contributing/reviewing.md` (#189) - `docs/agents/issue-tracker.md` exists, but the issue-text-is-data rule arrives with #230. No link check runs yet, so these links are dead until those issues land. - **Shared-runner entry worded as targets.** Whether the runner is registered for this repository only, and how the skills-source repository runs, could not be checked from here. Both are written as "is to be". Change them to plain statements if they already hold. - **Entry 6 drops "(stated in the README)".** The README says "Pin a tag, never a branch" and has nothing on pinning to a commit. That line belongs with the release-path work, not this pull request. - **Entries with no trigger or reduction in the spec** (4, 5, 7) say "none; accepted as is". Nothing was invented for them. - **"Control" instead of "gate" and "guard"**, following `GLOSSARY.md`'s "Avoid" list. "bot-diff gate" stays because it is the check's name. - **The secrets layer reads "may be referenced by one workflow only"**, which matches the spec's "one workflow may reference each secret" (at most one). ## Found and not changed - `GLOSSARY.md` still defines **Friend**, which contradicts the two positions here. I found no open issue for it; it needs its own. - `CONTRIBUTING.md` still describes organisation-level secrets. ## Verified - Pre-commit hooks pass on every commit: REUSE, gitleaks, Conventional Commits. The pre-push `ansible-test sanity` passes. - Two review rounds by subagents: Standards and Spec in parallel, then a combined re-check. Their findings are fixed in commits 2 and 3, apart from the README line and the known forward links. - A grep finds no hostnames, runner names, account names or secret names, and no mention of other repositories. The only hit was the existing `security@` contact. - Relative links and the `SECURITY.md#accepted-risks` anchor resolve, apart from the forward links above. - Neither file is in the Collection (`docs` and `SECURITY.md` are in `build_ignore`), so there is no changelog fragment. ## Not verified - How Gitea renders the pages, including whether the anchor link jumps. - "One screen": the ADR is 74 lines, most of it the actor table and the layers the spec requires. - Whether code-owner approval is enforced yet (#192). - The untested commit-status claim in entry 4, stated as untested. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added this to the Open to contributors milestone 2026-11-21 22:11:30 +00:00
Claude added 3 commits 2026-11-21 22:11:30 +00:00
ADR 0001 records the stance: actors and how far each is defended, assets,
the trust boundary, least-privilege targets, the layers against a pull
request that removes its own gate, and what is not done. The accepted
risks go to a new register in SECURITY.md, one entry per risk with why it
is accepted, its trigger and its planned reduction.

Closes #143

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
docs(adr): word the secrets rule as at most one workflow
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 40s
Molecule / molecule (pull_request) Successful in 1s
8a785b95ae
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
CODEOWNERS rules requested review from Defame1297 2026-11-21 22:11:30 +00:00
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-21 22:31:02 +00:00
Defame1297 approved these changes 2026-11-21 22:40:56 +00:00
Defame1297 merged commit c641c78525 into main 2026-11-21 22:40:56 +00:00
Defame1297 deleted branch docs/143-threat-model-adr 2026-11-21 22:40:57 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#285