From 08d81746af4518ea08f6b474535b6ad7c943a00e Mon Sep 17 00:00:00 2001 From: "Jon Radoff (Metavert)" Date: Tue, 3 Nov 2026 21:19:33 -0400 Subject: [PATCH 1/2] Threat model v1 (Security Steward) --- security/threat-model.yaml | 109 +++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 security/threat-model.yaml diff --git a/security/threat-model.yaml b/security/threat-model.yaml new file mode 100644 index 0000000..7f2d939 --- /dev/null +++ b/security/threat-model.yaml @@ -0,0 +1,109 @@ +# Threat model, maintained with the Security Steward (format steward-tm/0.1). +# IDs are permanent: retire a threat instead of deleting it, and never reuse a number. +schema: steward-tm/0.1 +project: metavert-io/lightcms +prefix: LC +model_version: 1 +reviewed_at_commit: 81707877bb8d29dd74cf79c8b919a91c0a3aa637 +refs: + asi: "2026" + asvs: 5.0.0 + llm: "2025" + mcp_spec: "2026-07-28" + stride: default +summary: 'A multi-user Go and MongoDB CMS (metavert.io): an admin UI, a REST API, an authenticated MCP server with OAuth 2.1 for connectors, a public read-only MCP endpoint, a public chat widget and search. It also publishes an MCP container image.' +components: + - id: C1 + name: Admin UI (/cm) + kind: client + exposure: internet + - id: C2 + name: REST API (/api/v1) + kind: service + exposure: internet + - id: C3 + name: Authenticated MCP server (/mcp) + kind: service + exposure: internet + - id: C4 + name: Public MCP endpoint (/mcp-public, read tools) + kind: service + exposure: internet + - id: C5 + name: OAuth 2.1 server for MCP connectors + kind: service + exposure: internet + - id: C6 + name: Public chat widget + kind: service + exposure: internet + - id: C7 + name: Uploads and assets + kind: data + exposure: internet + - id: C8 + name: System API key + kind: secret + - id: C9 + name: MongoDB + kind: data + exposure: internal + - id: C10 + name: Published MCP container image + kind: dependency + exposure: internet + - id: C11 + name: Outbound fetches (webhooks, RSS, asset-from-URL, link checker) + kind: service +boundaries: + - id: B1 + name: Internet to the app + between: + - C1 + - C2 + - C3 + - C4 + - C5 + - C6 + - id: B2 + name: Server to MongoDB + between: + - C2 + - C3 + - C9 +assumptions: + - id: A1 + text: The app runs on Fly behind its proxy, which sets Fly-Client-IP. +threats: + - id: T-LC-0001 + title: Outbound fetches are pointed at internal or metadata addresses (SSRF) + targets: + - C11 + tags: + - STRIDE:I + - STRIDE:T + - CWE-918 + - ASVS:5.0.0:V12 + status: mitigated + controls: + - M-LC-0001 + - id: T-LC-0002 + title: A client spoofs its address to dodge per-client limits + targets: + - C2 + - C6 + tags: + - STRIDE:S + - CWE-348 + status: mitigated + controls: + - M-LC-0002 +controls: + - id: M-LC-0001 + title: netguard SSRF guard on every outbound fetch + evidence: + - internal/netguard/netguard.go + - id: M-LC-0002 + title: Client address taken from Fly-Client-IP + evidence: + - internal/middleware/apiauth.go From b5f909ccf9d9b324ef16b51651093dea9fe08cbd Mon Sep 17 00:00:00 2001 From: "Jon Radoff (Metavert)" Date: Tue, 3 Nov 2026 21:19:34 -0400 Subject: [PATCH 2/2] Threat model v1 (Security Steward): guidance summary --- .claude/claude-security-guidance.md | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .claude/claude-security-guidance.md diff --git a/.claude/claude-security-guidance.md b/.claude/claude-security-guidance.md new file mode 100644 index 0000000..36bbfb2 --- /dev/null +++ b/.claude/claude-security-guidance.md @@ -0,0 +1,33 @@ +# Security guidance: metavert-io/lightcms + +Generated by the Security Steward from `security/threat-model.yaml` (model v1, reviewed at 81707877bb8d). Edit the model, not this file. + +A multi-user Go and MongoDB CMS (metavert.io): an admin UI, a REST API, an authenticated MCP server with OAuth 2.1 for connectors, a public read-only MCP endpoint, a public chat widget and search. It also publishes an MCP container image. + +## What this system protects + +- C1 Admin UI (/cm) (internet) +- C2 REST API (/api/v1) (internet) +- C3 Authenticated MCP server (/mcp) (internet) +- C4 Public MCP endpoint (/mcp-public, read tools) (internet) +- C5 OAuth 2.1 server for MCP connectors (internet) +- C6 Public chat widget (internet) +- C7 Uploads and assets (internet) +- C8 System API key +- C9 MongoDB (internal) +- C10 Published MCP container image (internet) +- C11 Outbound fetches (webhooks, RSS, asset-from-URL, link checker) + +## Assumptions + +- A1: The app runs on Fly behind its proxy, which sets Fly-Client-IP. + +## Keep in mind when changing code + +- T-LC-0001 (mitigated, STRIDE:I STRIDE:T CWE-918 ASVS:5.0.0:V12): Outbound fetches are pointed at internal or metadata addresses (SSRF). Relies on M-LC-0001 +- T-LC-0002 (mitigated, STRIDE:S CWE-348): A client spoofs its address to dodge per-client limits. Relies on M-LC-0002 + +## Controls that must stay in place + +- M-LC-0001: netguard SSRF guard on every outbound fetch (`internal/netguard/netguard.go`) +- M-LC-0002: Client address taken from Fly-Client-IP (`internal/middleware/apiauth.go`)