Skip to content

Threat Modeling

Structured security analysis of the platform, split by surface. Each category page is a self-contained STRIDE pass over one attack surface: its assets, trust boundaries, threats, controls, and residual risk.

Use this section to answer "what could go wrong here, and what stops it?" for a given part of the system. For how a surface works, follow the cross-links to the architecture and operations pages.

Method

Each category page follows the same shape:

  1. Metadata block: created, last-reviewed and next-review-due dates, reviewers, version, surface owner. Template below.
  2. Data flow diagram (DFD): the entry points, processes, data stores, and the trust boundaries crossed. Elements are numbered (External entity, Process, Data store, Flow) so threats reference them.
  3. DFD elements: a table naming each numbered element, so the STRIDE rows are traceable.
  4. Assets and trust boundaries: what is worth protecting and where control changes hands.
  5. STRIDE: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege. One table per element-class, each row tagged with the DFD ref it applies to: threat, control, residual.
  6. Findings and recommendations: prioritized and actionable. Rolled up into the register below.

Residual-risk levels: Low (control holds, accepted), Medium (control depends on a convention or has a gap worth closing), High (active exposure, fix first).

Metadata template

Copy this block to the top of every category page, replace each <…> placeholder, and keep the dates current:

| | |
|---|---|
| **Created** | <YYYY-MM-DD> |
| **Last reviewed** | <YYYY-MM-DD> |
| **Next review due** | <YYYY-MM-DD> (6-month cadence, or on any change to the surface) |
| **Reviewers** | Platform owner |
| **Version** | 1.0 |
| **Surface owner** | <Team / area> |

Review cadence. Each surface is re-reviewed every 6 months, or immediately when the surface changes (a new control, a new component, a new trust boundary). Bump Version and the Last reviewed date on any substantive edit; move Next review due forward. A page past its review date is a finding in its own right.

DFD conventions

Threat-model pages are the one place in this repo that use Mermaid instead of the dg-* HTML primitives. DFDs are graphs with crossing edges and boundary subgraphs that the box primitives render poorly. Material renders Mermaid natively. Draw each DFD as a ```mermaid flowchart LR:

DFD element Mermaid node
External entity (E) stadium E1([E1 · App user])
Process (P) rectangle P1[P1 · verify token]
Data store (D) cylinder D1[(D1 · user store)]
Trust boundary subgraph name[trust boundary: …]
Data flow (F) edge label -->|F2 ID token JWT|

Prefer one diagram per path; a single combined graph gets dense fast. Label every edge with its flow id and payload. A flow whose edge crosses into a subgraph is a trust-boundary crossing; those are where most threats live.

Categories

Category Surface Last reviewed Next due
Authentication App sign-in (password, Google, Apple, passkey, OTP), sessions and JWTs, IP blocker and lockout, operator gates (oauth2-proxy, Dex, Cloudflare Access, Tailscale), probe account 2026-10-13 2027-04-13
Network & Ingress Cloudflare edge (WAF, rate limit, Worker signing), layered abuse protection, AOP origin lock, Traefik, host firewall, Tailscale admin path, NetworkPolicy, edge-config CI identity 2026-10-14 2027-04-14
Release Integrity Terraform CI identity (WIF, provider tokens), release workflow identity, OTA publish and signing, mobile client token storage 2026-10-13 2027-04-13
Data Plane Postgres (CNPG), Redis, NATS backplane, Photon, R2 backups and restore 2026-10-19 2027-04-19
Secrets & Supply Chain Secret Manager + ESO sync, GitHub Apps and repo write access, GHCR images, Argo CD delivery, ARC runners, OTA publish, native builds 2026-10-13 2027-04-13

Add a page under docs/security/threat-model/ for each new surface, follow the shape above, add one row here and register its findings below.

Findings register

Every current finding across all categories: Open rows first, then Accepted, each sorted by priority. When a fix ships, delete the row.

Priority Category Finding Logged Status
Medium Authentication Shared OAuth client couples app and admin login. Give oauth2-proxy and Dex their own client. 2026-08-09 Open
Medium Release Integrity Xavia signs on the server with a key shared by dev and prod, so signing does not cover a server or upload-key compromise. 2026-10-12 Open
Medium Release Integrity Mobile refresh tokens live in AsyncStorage (unencrypted on Android). 2026-10-12 Open
Medium Network & Ingress Dev origin accepts direct connections that skip Cloudflare; the node IP is public through DNS-only admin hosts. 2026-10-12 Open
Medium Network & Ingress Docs Access app does not cover the Pages project's *.pages.dev hostname. 2026-10-12 Open
Medium Network & Ingress No NetworkPolicy for Loki or monitoring; no egress policy anywhere. 2026-10-12 Open
Medium Network & Ingress Every tailnet member reaches tag:server 22/6443; device approval is not managed in Terraform. 2026-10-12 Open
Medium Data Plane One R2 cluster token (R/W on the backup bucket) is mounted in six consumers across dev and prod; scopes are dashboard-only. Split per consumer and manage in Terraform. 2026-10-12 Open
Medium Data Plane Backend connects as the DB owner (DDL/DROP rights); no least-privilege runtime role. 2026-08-09 Open
Medium Secrets & Supply Chain eso-reader key never expires, reads all 63 secrets, rotation is manual with no reminder. 2026-10-12 Open
Medium Secrets & Supply Chain Prod pins mutable GHCR tags; provenance never verified. 2026-10-12 Open
Medium Secrets & Supply Chain Actions pinned by tag, trivy-action@master, allowed_actions = "all". 2026-10-12 Open
Medium Secrets & Supply Chain ARC hostPath cache shared across repos and PR jobs. 2026-10-12 Open
Medium Secrets & Supply Chain Native builds and signing run on one Mac with no build attestation. 2026-10-13 Open
Low Authentication Refresh tokens stored in Postgres as issued; only the Redis key is hashed. 2026-10-12 Open
Low Authentication Lockout and passkey begin reveal account existence; a stranger can hold a victim's password login locked. 2026-10-12 Open
Low Authentication Probe account is a full standard account with a public email; anyone can lock it and page login DOWN. 2026-10-12 Open
Low Authentication Role is read from the JWT; a DB role change needs a token_version bump. 2026-10-12 Open
Low Authentication pgAdmin and redis-insight record the operator only in the proxy access log. 2026-08-09 Open
Low Network & Ingress AOP uses Cloudflare's shared origin-pull CA. 2026-10-12 Open
Low Network & Ingress Edge protection is Free-plan coarse: 10s rate-limit window, no regex, WAF events only in the dashboard. 2026-10-14 Open
Low Network & Ingress Nothing ties Ingress hosts to namespaces, and allowExternalNameServices=true lets an Ingress proxy to any host. 2026-10-13 Open
Low Network & Ingress The loki-push Access service token expires after a year with no expiry alert. 2026-10-13 Open
Low Data Plane Photon index integrity is same-origin: the MD5 comes from the bucket it checks. 2026-10-13 Open
Low Data Plane Redis Insight has no login of its own; pgAdmin uses SSLMode: prefer. 2026-10-13 Open
Low Data Plane Backups use R2's provider-managed encryption only; a cluster-token holder reads them. Customer-key (SSE-C) encryption pending CNPG support. 2026-10-19 Open
Low Secrets & Supply Chain image-updater ClusterRole reads every Secret in the cluster. 2026-10-13 Open
Low Secrets & Supply Chain devops Dependabot terraform covers only infrastructure/cloudflare. 2026-10-13 Open
High Secrets & Supply Chain No branch protection (GitHub Free): any writer can push main, deploying prod and running apply. GitHub Free on private repos has no branch protection or rulesets. Mitigations: repo write is limited to the team, admin comes only from the org role, and applies run only from main. 2026-10-12 Accepted
High Secrets & Supply Chain Org 2FA not required. The owner chose not to require it; members without 2FA would be removed from the org. Mitigations: repo access comes through teams, admin only through the org role, and applies run only from main. 2026-10-12 Accepted
High Release Integrity Plans load write-capable Cloudflare, Tailscale and GitHub credentials, so any branch push can change DNS, Access, the tailnet policy or GitHub settings. One credential per provider serves plan and apply; fork PRs get no OIDC token and repo write is limited to the team. 2026-10-13 Accepted
Medium Data Plane Prod CNPG backups (prod/) are unlocked (barman rewrites keys); any cluster-token holder can delete them. 2026-08-09 Accepted
Medium Data Plane Single-instance Postgres on one node. Pre-launch single node; PITR from off-node backups and a passing restore drill cover data loss. Revisit on node reprovision or OS reinstall, a new node, or a customer/contract requirement. 2026-10-19 Accepted
Low Authentication Nonce is client-supplied, not server-issued, so it gives no replay protection. Accepted (ID tokens are short-lived). 2026-08-09 Accepted
Low Data Plane No disk encryption at rest on the OVH server; PVCs are plaintext. Pre-launch single node; OVHcloud erases drives (NIST 800-88 Purge) after the service ends and we Purge before release; backups are off-node and encrypted with a passing restore drill. Revisit on node reprovision or OS reinstall, a new node, or a customer/contract requirement. 2026-10-12 Accepted