Skip to content

The threat model

The attacks Sypnia Data is designed against, and what stops each one.

Applies to EngineCloud
View as Markdown
On this page
  1. Fixed findings
  2. Out of scope
ThreatWhat stops it
Guessing passwords, credential stuffingrate limits per IP and per e-mail, waits that double after 10 failures, CAPTCHA, the breached-password check, and the same answer for unknown e-mails
A stolen refresh tokenrotation: the next use by either party reveals the theft and ends the session; in cookie mode it is HttpOnly, so page scripts cannot read it
A stolen access tokenit expires in an hour; machine tokens can be DPoP-bound and are useless without the private key
Forged tokenseach project signs with its own Ed25519 key; verification uses the project’s JWKS and the kid
Phishing with auth linksredirects only to allowed addresses; links are single-use, stored as hashes, expire in an hour
CSRF against cookie sessionsSameSite=Lax, a double-submit CSRF header, and CORS limited to allowed origins
A leaked secret keyrefused from browsers, stored as a hash, revocable in a click, registered with GitHub secret scanning
SQL injection through the Data APIevery value is a parameter; tables and columns are checked against the schema before any SQL is built; one statement per request
Escalating inside the databaseno superuser; the engine’s login has no rights until it takes a role for one transaction; service_role only with a secret key or project:admin
Taking a privileged scope you were not givensql:*, auth:admin and project:admin count on a user’s token only when an admin listed them in app_metadata.scopes; PATs, device approvals and consents asking for more fail with 403 scope_not_allowed; open registration never grants them
Reading another projectthe host decides the project through the registry, never input; each project has its own database, roles and keys
An agent doing too muchscopes, a consent screen, an audit log of every call, and revocation that takes effect at the next refresh
Exhausting the servicerate limits, statement timeouts, row caps and a cap on concurrent instances

Fixed findings

2026-11-17: privileged scopes could be self-granted (critical, fixed before launch).

  • What happened. A signed-up user of a project could create a PAT for themselves with sql:write, or approve the device flow of the built-in CLI client with it. Either way they could run SQL as the project’s owner role.
  • Where it reached. That held for the sypnia project too, whose database holds the Sypnia Cloud control plane.
  • Exposure. The engine had been live for hours, with no outside users. The only such tokens came from two QA accounts, and none of them ran SQL.
  • The fix.
    • The entitlement rule above, enforced at issuance and again at every use.
    • Account changes need the person’s own session.
    • The CLI asks only for non-privileged scopes by default.
    • Regression tests cover PATs, the device flow, dynamic registration and authorization code with PKCE.

Out of scope

Your app’s own code, your database server’s security (patches, network, backups when it is yours), and devices of your users that are already compromised.

  1. Fixed findings
  2. Out of scope

    Search pages, sections and terms