Architecture portfolio

Threat model

Security and threat model

A lightweight STRIDE review of the platform. It covers what is worth protecting, where trust changes hands, the control for each threat, and the honest residual risk.

1. What we protect

AssetWhy it mattersSensitivity
App databases (family app, games, self-discovery tests)Personal data, including family photos and notesHigh
Backups14 days of everything aboveHigh, so they're encrypted
Deploy path (CI keys, deploy scripts)Whoever controls it controls what's servedHigh
Android signing keysUsed to publish updates to children's appsHigh, never in Git
Domain and TLSUsers' trust that they're on the real siteMedium
Local-first app dataStays on users' devices; never reaches the serverOut of scope by design (ADR 005)

2. Trust boundaries

  1. Internet → edge: only ports 80 and 443 (Traefik) and SSH are open. Port 80 only redirects to HTTPS. Containers are exposed only when they opt in with labels, and the Traefik dashboard is turned off.
  2. Edge → app: each app runs in its own Compose network, so Traefik reaches only the web container.
  3. App → database: each database sits on its app's private network with no published port. The only other thing that can reach it is the backup container.
  4. CI → host: SSH with keys locked to a single command per app (ADR 002).
  5. AI agent → production: the agent is an unprivileged user that changes production only through Git (ADR 009).
  6. Host → offsite: the host sends out only ciphertext, and it can't decrypt its own backups (ADR 003).

3. STRIDE analysis

ThreatExampleControl in placeResidual risk
SpoofingA fake site, or a stolen CI identity, deploys codeHTTPS everywhere with automatic certificates; SSH key-only (no passwords); CI keys locked to one commandLow. Root login is still allowed with a key; see gaps
TamperingHand edits on the server, or a modified buildEvery deploy runs git reset --hard origin/main; read-only deploy keys; builds from source in DockerMedium. Base images use :latest tags and aren't signed or scanned
Repudiation"Who changed this?"Every change is a Git commit; key setup is logged to syslog; Actions keeps run historyLow
Information disclosureDatabase leak; backup leak; XSS stealing dataNo published DB ports; encrypted backups; strict CSP and security headers on static apps; local-first data; no third-party trackersMedium. Some app secrets sit in env files in private repos; see gaps
Denial of serviceTraffic flood; one app starving the othersLow-cost static sites; Traefik in frontMedium-high. No rate limits, CDN or per-container memory limits yet
Elevation of privilegeCompromised app or proxy → host rootUnprivileged agent user; sudo limited to two validated scripts; containers don't run in privileged modeMedium. Traefik can reach the Docker socket (read-only mount, but the API itself isn't restricted)

4. AI-specific threats

Because an AI coding agent works on this platform, the model includes threats specific to it:

ThreatControl
Prompt injection from a web page, dependency or file makes the agent run harmful commandsThe agent has no root and no write access to live apps; production changes need Git and the pipeline; destructive actions need human approval
The agent leaks secrets into code or commitsSigning keys and the backup decryption key live outside any repo, or offline; repos are private (moving secrets out of repos entirely is on the roadmap)
The agent ships plausible but wrong codeAutomated tests, emulator CI for the Android apps, a health-checked deploy, and Git revert. Pull-request gating is planned

The highest residual risks: secrets in Git, the Docker socket, no image scanning, no rate limiting, and root SSH login. Each one is on the gaps and roadmap page with its planned fix.