docs(relay): threat-model.md per-process surface (#11)#14
Conversation
Adds docs/threat-model.md catalogueing the operational attack surface of the relay binary as a deployed process — deploy, supply chain, DoS, log hygiene, cert handling, TLS config, error-leakage. Each entry records severity, v1 mitigation (with file:line anchor), residual risk, and future hardening, framing v1-deferred work as a first-class status. Updates docs/architecture.md "Threat model" section to point at the new doc instead of "to be written". Closes #11 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Code Review: #11Decision: PASS Findings
SummaryMarkdown-only deliverable; ticket is not The doc matches the spec one-for-one: all seven threat domains are present (Deploy security, Supply chain, DoS resistance, Log hygiene, Cert & key handling, TLS configuration, Error response leakage), each with the four required fields (severity / v1 mitigation / residual risk / future hardening). The "Triggers for re-review" section is present and exhaustive. Technical claims verified against the codebase:
Prose voice matches the protocol spec's Security model (short paragraphs, not bullet salad, code anchors on every grounded claim) per the spec's instruction. v1-deferred is consistently framed as a first-class status rather than a gap. The line-number nits above are the only blemishes and don't block merge. |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
What
Adds
docs/threat-model.mdcataloguing the relay's operational attack surface — distinct from the wire-protocol threats already in the protocol spec's Security model. Seven sections, each with severity / v1 mitigation / residual risk / future hardening: deploy security, supply chain, DoS resistance, log hygiene, cert & key handling, TLS configuration, error response leakage. Closes with "Triggers for re-review" and an explicit out-of-scope list.Updates
docs/architecture.md's "Threat model" section from "to be written" to a one-paragraph pointer at the new doc.Issue
Closes #11.
Testing
Documentation only; no Go changes. Verified:
go vet ./...— clean.go test -race ./...— clean (internal/relay1.4s).Architecture compliance
Follows the spec at
docs/specs/architecture/11-threat-model.md:file:lineanchors (cmd/pyrycode-relay/main.go:53-95,internal/relay/tls.go:16-55,internal/relay/tls.go:80-88, etc.) — every code-grounded claim is anchored.0700in operator-facing prose; does not pre-pick a future WebSocket library.🤖 Generated with Claude Code