Skip to content

Yomorai threat model

Status: v0.0.1 pre-implementation baseline. Requirement IDs refer to openspec/changes/yomorai-v0-0-1/specs/. Each mitigation is a requirement with tests; this document does not claim a mitigation is effective until the release verification report shows the requirement as verified.

One deployment serves one customer, in the customer’s own Cloudflare and GitHub accounts. There is no Yomorai-operated service. In scope: the Worker control plane, per-repository Agent, review Workflow, browser executors, performance runner, storage, model adapters, dashboard, CLI, MCP server and GitHub Action. Out of scope: the security of GitHub, Cloudflare and model providers themselves, and of the customer’s reviewed application.

ID Asset Why it matters
A1 GitHub App private key and webhook secret Can publish checks and comments as Yomorai; can forge events
A2 Test credentials and browser storage state Access to customer staging and production as a test identity
A3 Model provider API keys Spend; access to provider account
A4 Profile encryption key Decrypts A2
A5 Evidence (screenshots, DOM, network data) May contain customer and personal data
A6 Review state, approvals, audit log Integrity of every verdict and of accountability
A7 Budget Money
A8 Production application Must not be changed by a review
A9 The published verdict Developers rely on it to merge
  • Maintainer — trusted to approve reviews and change configuration.
  • Contributor — may open PRs, including from forks; content is untrusted.
  • Malicious contributor — controls PR title, description, code and therefore the preview deployment’s entire content and behaviour.
  • Third-party content — scripts and resources loaded by reviewed pages.
  • Network attacker — can send requests to public endpoints.
  • Dashboard user with read access — may attempt to escalate.
  • Coding agent via MCP — acts for a user; may be steered by untrusted content.
  • Model provider — receives prompts; outputs are untrusted.
  1. Internet → webhook and API endpoints.
  2. Orchestrator (trusted: holds A1, decides, publishes) ↔ browser executor (handles untrusted pages; holds only the A2 for its own execution).
  3. Engine ↔ model providers (prompts leave the account).
  4. Reviewed page ↔ browser context (page scripts are hostile).
  5. Dashboard / CLI / MCP users ↔ API.
  6. Preview environment ↔ production environment (different risk; production is read-only).
# Threat Asset Mitigation Requirements
T1 Forged or replayed webhook starts or alters reviews A6, A7 HMAC verification with constant-time compare; delivery-ID dedupe; rejection audited LIFE-009, LIFE-004
T2 Fork PR causes execution with secrets A2, A7 No execution without maintainer approval, for every author; fork policy; action never runs PR code with secrets AUTHZ-001, AUTHZ-005, DEPLOYOPS-004
T3 Approve-then-push (TOCTOU) A2, A9 Approval stores the full SHA; any head change invalidates; re-check before execution and before publication AUTHZ-002, AUTHZ-003, AUTHZ-007
T4 Approval by someone without permission, or self-approval A6 Live permission check at approval; self-approval off by default; denial audited AUTHZ-004
T5 Malicious preview page steals test credentials A2 Fresh context per execution; cookies bound to declared origins; no credential API reachable from page; navigation confined to allowlist; service workers blocked BROWSER-006, BROWSER-007, BROWSER-008, AUTH-006
T6 Session state leaks between PRs or repositories A2, A5 Context destroyed on end, failure and cancellation; secrets scoped by repository and environment BROWSER-006, AUTH-004
T7 Review mutates production (form post, delete, payment, message) A8 Fail-closed request guard on non-GET methods and WebSockets; destructive-action denylist; state-changing steps stop before the request; production profiles must be declared read-only SCEN-003, SCEN-004, SCEN-008, AUTH-005
T8 Prompt injection through PR text or code A9 PR content passed as delimited data; policy never read from model output; deterministic gate decides INTENT-004, CLASS-003
T9 Prompt injection through page content or screenshots A9 Page content passed as delimited data; visual model has no verdict field; explanations must cite stored evidence MODEL-006, VISUAL-004, VISUAL-005, CLASS-008
T10 Secrets sent to a model provider A2, A3 Prompts built from an allowlisted projection; redaction; prompt blocked if it contains a configured secret MODEL-004
T11 Secrets written to logs, evidence, reports or the repository A2 Encrypted at rest with AAD binding; decrypted only in the execution; secret scan test over all outputs; structured logs carry no secret values AUTH-004, LIFE-011, AUDIT-002
T12 Page content drives privileged orchestration (publish, approve, change budget) A6, A9 Executor holds no orchestration or GitHub credentials; only the orchestrator publishes BROWSER-008, GH-003
T13 Markdown, HTML or mention injection in the published comment A9 Escaping of all untrusted text in published output GH-003
T14 Stale or superseded result published as current A9 Atomic head-SHA and state check at publication LIFE-007
T15 Model invents evidence or a verdict A9 Schema validation; evidence references must resolve; missing evidence can only yield inconclusive or a gap; severity proportional to evidence VISUAL-005, CLASS-003, CLASS-004, CLASS-005, CLASS-008
T16 Evidence tampered with after capture A5, A9 Content-addressed, write-once storage; hash verified on read; failures surfaced STORE-002, STORE-003
T17 Audit log altered or truncated A6 Append-only hash chain; verification command AUDIT-003
T18 Cost exhaustion through many PRs or large pages A7 Approval gate before spend; reserve-before-spend; per-review, per-repository and per-installation budgets; scenario and duration limits AUTHZ-001, BUDGET-002…005, SCEN-005
T19 Server-side request forgery through deployment URLs A5 URLs only from providers or configuration; origin allowlist; never model-generated DEPLOY-003, DEPLOY-006
T20 Wrong deployment reviewed (stale or spoofed preview) A9 Preview bound to head SHA by provider; build-identifier check; allowlist DEPLOY-002, DEPLOY-005, DEPLOY-006
T21 Dashboard privilege escalation or cross-repository access A5, A6 Server-side permission check on every call against live GitHub permission DASH-001
T22 MCP or CLI used to bypass approval or read secrets A2, A6 Same authorization, budget and guard rules on every entry point; secrets never returned MCP-004, CLI-005
T23 Generated tests modify protected branches repository Export only as file, patch or PR to a new branch; contents-write permission optional TESTGEN-004, GH-004
T24 Over-broad GitHub permissions amplify a compromise A1 Minimal manifest; contents write only in the optional variant GH-004
T25 Supply-chain compromise of a dependency or of the TLA+ tools all Lockfile, pinned checksums for downloaded tools, dependency review in CI (CI policy, task 3.5)
T26 CAPTCHA or MFA circumvention creates legal and account risk A2 Never attempted; human-assisted mode instead AUTH-003, AUTH-002
  • GitHub delivers each webhook at least once and its HMAC secret is not disclosed.
  • Calls into a single Durable Object are processed one at a time; this is what makes approval, state and budget transitions atomic.
  • Browser contexts in Chromium provide the isolation they document.
  • The customer’s test identities have no more privilege than they intend, and production test identities are genuinely read-only; Yomorai adds enforcement but cannot verify the customer’s own access control.
  • The Cloudflare account and its secrets are administered only by trusted staff.
Risk Why it remains Handling
A state-changing GET endpoint in production The guard keys on HTTP method Documented; configurable URL denylist; destructive-control denylist reduces exposure
Head moves on GitHub after the final check but before the API call completes No cross-system transaction exists Window is one API call; next event marks the check superseded
Evidence contains personal data from the reviewed application Yomorai captures what the page shows Masking configuration, retention limits, model I/O retention policy, customer-controlled storage
A model provider retains prompt content Outside the customer’s account Redaction, allowlisted projection, self-hosted model option
Browser zero-day escapes the context Outside Yomorai’s control Remote browsers run in Cloudflare’s sandbox, not on the control plane
Formal models are bounded abstractions TLC explores finite instances Conformance tests against the implementation; limits stated in formal/README.md

This model is revisited whenever a requirement marked critical changes, a new entry point or provider adapter is added, or an incident occurs. Changes go through OpenSpec with the affected threat rows cited.