Skip to main content

Threat Model

This qualitative review covers the deployed review release: Cloudflare Workers, the Cloudflare API proxy, a single EC2 host running Caddy/FastAPI/PostgreSQL, authentication, workspace data, public review codes, and external AI processing.

The threats are organized using STRIDE categories. Likelihood and priority are engineering judgments, not measurements from an independent security assessment. Historical App Runner/RDS/CloudFront decisions are retained in the ADRs; they are not controls for this deployment.

Assets and trust boundaries​

The main assets are account credentials and sessions, workspace client/project/story data, approved backlogs exposed by access code, user-owned AI keys, platform AI credits, deployment credentials, and Terraform state.

Requests cross four important boundaries: browser → Cloudflare → API host, API → database, API → external AI/email services, and operator/CI → deployment infrastructure. The Security Architecture visualizes these boundaries.

Current threats and controls​

Each row names a threat, the control that exists today, and what remains unprotected.

IDSTRIDE categoryThreatImplemented controlResidual exposure
R-01SpoofingCredential stuffing or password guessingbcrypt hashes, endpoint throttling, persisted account lockoutReused passwords and phishing remain possible; no MFA.
R-02SpoofingSession theft or refresh-token replayFifteen-minute access tokens; HttpOnly browser refresh cookie; trusted-origin checks; single-use rotationA stolen access token can work until expiry; XSS can act as the user while active.
R-03Information disclosureAccount enumeration through registration or resetGeneric responses for existing-account registration and password-reset requestsOther behavior still requires review; generic responses alone are not proof against timing analysis.
R-04Elevation of privilegeMember invokes Admin operations or accesses another workspaceRoute-role dependencies and workspace-scoped repositories; foreign records return 404Application enforcement can regress; database RLS is absent.
R-05Information disclosureClient-review code is guessed or shared beyond its intended audienceRandom project codes, uniform miss responses, IP limit, regenerationAnyone holding a code can read; no expiry or individual revocation.
R-06TamperingSQL injection or unsafe rendered textTyped validation, ORM parameterization, response/header controlsNew query or rendering paths require the same checks.
R-07Information disclosureProvider key or runtime secret leaksAES-256-GCM key storage; masked read responses; SSM parametersCompromise of runtime credentials or the encryption key exposes the protected boundary.
R-08Information disclosure / tamperingOrigin connection is interceptedHTTPS through Cloudflare and Caddy; ingress restricted to edge rangesFull TLS mode does not validate the origin certificate.
R-09Denial of serviceBursts exhaust API, database, or provider capacityProcess-local IP limiter; persisted auth/key-validation budgets; credit checksOne small host, no autoscaling; limiter state is not distributed.
R-10TamperingPrompt injection changes generated outputNote redaction, prompt delimiters, explicit review before persistencePattern matching is incomplete; no dedicated toxicity or prompt-leak detector.
R-11Information disclosureDiscovery notes disclose sensitive material to an AI providerProvider selection is explicit; keys are not included in the promptNotes leave the application boundary; reviewers must choose what they submit.
R-12Denial of serviceHost failure, volume loss, or failed migrationReproducible image/IaC and startup migrationsNo database backup or failover; application data can be lost.
R-13Tampering / elevation of privilegeMalicious dependency, workflow, or deployment artifactRepository quality/security checks; versioned image releases; operator-controlled SSM deployThese controls do not eliminate supply-chain or operator-credential compromise.
R-14RepudiationInadequate evidence for troubleshooting or attributionStructured request-correlated logs; backend SentryNo complete audit trail, public-reader identity, or deployed infrastructure alarms.

Token, session, and verification-code lifetimes are documented in Security Architecture. The client-review access code has no automatic expiry; regenerating it revokes the old code for all readers.

Review priorities​

Before accepting the review release:

  • Confirm the documented limitations are acceptable for demonstration data.
  • Run and record authentication and workspace-isolation checks, and exercise access-code regeneration and invalid-code behavior. Record the commands, commit, environment, and observed results; a test file or checked roadmap box is not execution evidence.
  • Check that logs and error responses do not expose passwords, provider keys, refresh credentials, or raw notes unnecessarily.

Before broader use with valuable data:

  • Add a database backup and restore procedure, and a recovery path for a failed deployment or migration.
  • Verify the origin certificate.
  • Add durable shared throttling before adding API workers.
  • Review access-code expiry or stronger sharing controls if clients need individual authorization.

MFA, richer audit records, alerting, and provider-specific moderation are options to evaluate against the intended usage, not existing features.

Assessment limits and review triggers​

No penetration-test report, formal OWASP compliance assessment, or verified incident-response service is recorded by this page. Test coverage and current pass/fail status must be taken from executed checks, not inferred from the design.

Revisit this model when the deployment topology, roles, session handling, external AI providers, data sensitivity, or public-sharing model changes. An owner, recurring review schedule, and formal risk acceptance record are TBD.

References​

Last Updated: 2026-10-26