Security model
For operators: what Yomorai protects, how, and where the protection ends. The full threat model, with 26 threats mapped to requirements, assumptions and residual risks, is security/threat-model.md. Reporting a vulnerability: SECURITY.md.
The central risk is simple: a pull request — possibly from a stranger — controls the code of the preview deployment and the text of the pull request, and a review runs a browser with your test credentials next to it and spends your money. Everything below exists to keep that contained.
Approval bound to the exact commit
Section titled “Approval bound to the exact commit”- No review runs without an approval, for every author including maintainers. There is no setting that turns this off.
- An approval names the commit:
/yomorai approve <sha>with at least 7 hex characters, matched against the pull request’s current head only, and stored as the full 40-character SHA. Other channels: the check run’s approval button, the dashboard,yomorai approve, the API. - The approver’s repository permission is fetched live from GitHub at that
moment. Default minimum:
maintainon organization repositories,adminon user-owned ones (trust.minApproverPermissioncan setwrite,maintainoradmin). Authors cannot approve their own pull requests unlesstrust.allowSelfApprovalis set. Denials are audited. - A new push supersedes the review and invalidates its approval atomically.
- Authorization is checked again when execution starts and at every stage boundary, and the publication step checks that the reviewed commit is still the head. A result for an old commit is never published.
- An API token with the
approvescope approves with the repository’s minimum approver permission; such tokens can only be created by a maintainer signed in to the dashboard, and their creation is audited. Treat them like the permission they carry.
These protocols are modelled in TLA+ and the implementation is tested against the models (Verification).
Configuration read from the default branch
Section titled “Configuration read from the default branch”The deployment reads yomorai.config.yaml from the repository’s default
branch (or the configuration saved in the dashboard), never from the pull
request. A pull request cannot widen origins, add safe requests, change
budgets or approval rules for its own review. The file is data and is never
executed.
Production is read-only
Section titled “Production is read-only”The guard (packages/browser/src/guard.ts) is installed in the browser
context before the first navigation, and checked with a probe request whose
blocking must be observed — otherwise the execution aborts before production
is contacted (production_guard_failed).
- Requests other than GET, HEAD and OPTIONS to a production origin are
blocked, unless the exact method and URL pattern are in
safeRequestswith a reason. - Production WebSockets are blocked; a browser provider that cannot intercept WebSockets fails the execution.
- Top-level navigation outside the environment’s origin allowlist is blocked.
- A scenario step that preview showed would send a blocked request is not run in production; production stops before it and the rest is preview-only.
- Controls whose accessible name contains a denylisted word (delete, pay, send, …) are never activated in production.
- A production authentication profile must be declared
readOnly: true. - Blocked requests and navigations are audited.
Limits. The guard keys on the HTTP method. A production endpoint that changes state on GET is not stopped by it. Requests to third-party origins are not blocked by the production guard (navigation to them is). Yomorai cannot verify that a “read-only” test identity really is read-only. Preview is not guarded at all.
Isolation
Section titled “Isolation”- Each execution gets a new browser context, destroyed at the end, on failure and on cancellation. Service workers are blocked.
- Credentials and browser state of an authentication profile are decrypted only for the execution that uses them, applied only to the profile’s declared origins (cookies need an exact host match), and never shared across repositories, environments or pull requests.
- Profiles are not used for pull requests from forks unless
trust.forks.allowAuthenticatedProfilesis set. - CAPTCHA and multi-factor challenges are detected and never attempted.
- The code that handles pages holds no GitHub or orchestration credentials; only the orchestrator publishes.
Secrets and prompt privacy
Section titled “Secrets and prompt privacy”- Deployment secrets are Worker secrets; nothing secret is in
wrangler.jsoncor the repository configuration. Authentication profiles are stored in D1 encrypted with AES-256-GCM underYOMORAI_PROFILE_KEY, with repository, environment and profile as associated data. - Prompts are built only from allowlisted projections of the pull request and of deterministic observations — never raw network headers, cookies or storage state. Untrusted text (pull request, DOM text, console messages) is wrapped in delimited data blocks with a random boundary, under a fixed instruction not to follow it.
- Before a request leaves, every text part is redacted, and a prompt that
contains a configured secret value is not sent (
prompt_blocked). - Model output never decides policy: it is schema-validated, may cite only stored evidence, and passes the deterministic gate.
- Logs, traces, CLI output, MCP results and published comments pass the redactor; published text is escaped against Markdown, HTML and mention injection.
models.retentioncontrols what is kept of model calls (defaultmetadata_only: no prompts or responses).
Audit chain
Section titled “Audit chain”Approvals (granted, denied, revoked, invalidated), execution start, end and
failure, cancellation, supersession, publication and skipped publication,
credential access, configuration changes, blocked navigation and production
requests, rejected webhooks and deployment URLs, test-candidate decisions and
exports, human sign-in requests, evidence expiry and API token changes are
written to an append-only log. Each record’s hash covers the previous one;
the database refuses updates and deletes of the table, and a head row pins the
newest record so truncation is detected. yomorai audit verify (or
GET /api/audit/verify) recomputes the chain and reports the first break.
Evidence is content-addressed (SHA-256), written once, and verified when read;
a mismatch is reported (evidence_integrity_failed) and the finding is marked
unsupported.
What leaves your account, and when
Section titled “What leaves your account, and when”| Destination | When | What |
|---|---|---|
| GitHub | Always (deployment) | API calls with your App’s installation token: reading pull requests, files, configuration, collaborator permission; publishing check runs and comments |
| Your production and preview origins | During a review | Browser and Lighthouse traffic, restricted to the origin allowlists |
| Cloudflare APIs | If configured | Pages / Workers discovery, Workers AI over REST |
| Model providers | Only if you configure a model | Redacted, allowlisted prompts; screenshots for the visual model |
| Your trace destination | Only if you configure one | Redacted spans; prompts and responses only with retention: full |
There is no Yomorai-operated endpoint, no telemetry to the project, and no update check. Webhooks into the deployment are accepted only with a valid HMAC signature, checked before the body is parsed; replays are deduplicated by delivery id.
Residual risks
Section titled “Residual risks”From the threat model: state-changing GET endpoints; a push landing between the final head check and the GitHub API call (a window of one API call); personal data in evidence (use masks, retention and your own storage); a model provider retaining prompts (use redaction or a self-hosted model); browser sandbox escapes; and the formal models being bounded abstractions. See threat model, section 7.