ResilientLang docsDeveloper documentation (draft, product name is a placeholder)

Security model

This page summarises the design documents in docs/security/ of the repository. It is not an audit or a certification, and not legal advice.

Trust boundaries#

PartTrustWhy it matters
Visitor's browserRuns the loader; untrusted by the serverOnly public data is ever sent to it
Delivery plane (your site, CDNs)Public static files; can be tampered with in transit or at rest by an attacker with storage accessSo every manifest is signed and every language file is hash-checked
Control planeHolds secrets, hashes, translationsAuthenticated by secret keys; tenant-isolated
Translation providersReceive page text onlySee Data handling

Integrity of what visitors receive#

  1. The manifest carries an Ed25519 signature over its RFC 8785 canonical form. The loader and plugins refuse a missing or invalid signature, an unknown kid, or a lower version than they have already accepted.
  2. The signed manifest lists each language file's SHA-256 and size. A file that does not match is refused.
  3. Rotation: several public keys can be configured. A valid manifest signed by a later key supersedes state created by an earlier key, so a stolen or buggy key can be recovered from if a standby key was configured in advance. Details and limits: Signing and key epochs.
  4. The signing key is held by the application (encrypted at rest) for development and first launch, with a move to a KMS or vault before scale. Keys are per site, so theft of one key affects one site.

Secrets#

Tenant isolation#

Every query is scoped to the tenant of the calling key and fails closed. Cross-tenant ids return 404.

Outbound fetches#

Crawling (POST /v1/sites/{siteId}/scan) is protected against server-side request forgery: the design refuses private, loopback and link-local addresses and requires connecting to the address that was validated (to defeat DNS rebinding). The review that specifies this is docs/security/SSRF_REVIEW.md; whether the final fetcher implements every point is verify.

Data handling#

What this model does not claim#

See also CSP and headers and Limits.