Security
xixo reads other people’s files, fetches pages from the web, and hands text to models that call tools. Each of those is a way in. This page lists the threats and the defense for each.
| Threat | Defense | Described in |
|---|---|---|
| One tenant reading another’s catalog | Two isolation layers, one enforced by Postgres | Isolation |
| A token issued for somewhere else | Issuer, audience, and tenant checked on every request | Signing in, tokens |
| A stolen database dump | Secrets encrypted at rest | Secrets at rest |
| A resource or a URL that points inside the network | Every address resolved, checked, and pinned | Reaching addresses |
| A page that attacks the browser rendering it | A locked-down Chrome behind a checking proxy | Rendering pages |
| A stored file that runs script when opened | A sandbox, and downloads for anything active | Serving files |
| A path or id that reaches past what a resource was attached to | Every key cleaned and encoded | Paths |
| A file built to break a parser | Parsers run in xixo link, away from the catalog | Reading files |
| Text that gives a model instructions | Fenced prompts, narrow grants, and confined runs | Models and prompt injection |
| One person’s private files reaching another | Readers recorded on every feed | Only mine, or everyone’s |
| A client that calls too often or runs too long | Rate limits, run budgets, and gates | Budgets and gates |
| An action nobody can account for | An audit event for every call and refusal | Audit |
| A credential in an error message | Every error scrubbed | Errors |
Tokens
Section titled “Tokens”/graphql, /mcp, /uploads, /share, and /references/:id/content each verify a masks access
token, as described in signing in. Production refuses to boot
without XIXO_PUBLIC_ORIGIN, so a request’s Host header never chooses the token’s audience.
- A token’s scopes decide what it reaches. A GraphQL field that names a scope refuses a token
without it, and an MCP tool the token cannot use is left out of
tools/list. See the scopes reference. - The session cookie is
HttpOnly,SameSite=Lax, andSecurein production. - A browser request that carries the session cookie also needs the page’s CSRF token. A request with a bearer token does not.
POST /sharereceives a phone’s share sheet, which sends no CSRF token. It accepts a request with only the cookie when the browser marks itSec-Fetch-Site: noneorsame-originand anyOriginit sends is this tenant’s origin. A post from another site, another tenant’s subdomain included, is refused.- A page on another site may call
/mcpand read/.well-known/oauth-protected-resource, so an MCP client that runs in a browser can connect. The browser sends no cookies on those calls, so the page acts only with a token it holds. - An
Mcp-Session-Idbelongs to the subject that opened it. xixo refuses it from anyone else.
Secrets at rest
Section titled “Secrets at rest”Active Record Encryption encrypts every secret xixo stores:
resources.credentials, which holds every secret a resource was attached with, such as access keys, API keys, passwords, and delegation secrets.tenants.client_secretandtenants.registration_access_token, which belong to the tenant’s masks client.
The resource form reads back only the names of the secret fields that have a value. The audit log records which fields were set and never their values. Rails filters secrets, tokens, and passwords from the request log. For a resource connected through masks, masks keeps the provider’s tokens. See resources connected through masks and encryption and secrets.
Reaching addresses
Section titled “Reaching addresses”xixo checks every address it reaches for someone: downloads, snapshots, feeds, WebDAV, search, MCP servers, git over HTTPS, and IMAP.
- Only
httpandhttpsare accepted. - The host is resolved, and the address is refused if any result is loopback, private, link-local, shared, documentation, multicast, or otherwise reserved, for IPv4 or IPv6. An IPv4 address inside an IPv6 address is checked as IPv4. A host that does not resolve is refused.
- xixo connects to the address it checked and does not look the name up again, so a resolver cannot
answer the check with a public address and the connection with a private one. The
Hostheader and the TLS certificate still use the name. - Each redirect is resolved and checked again.
- A response from a download, a web API, or a model server is read with a size limit, so an answer that never ends fails before it fills memory.
An operator opens private addresses by service:
XIXO_S3_ORIGINS |
S3 endpoints at a private address. An endpoint not listed is also checked on the address that answers. |
XIXO_MCP_ORIGINS |
MCP servers at a private address. |
XIXO_SEARCH_ORIGINS |
Search APIs at a private address. |
XIXO_INFERENCE_ORIGINS |
Every model server a tenant may use, public ones included. A model server not listed is refused. |
XIXO_ALLOW_PRIVATE_FETCH |
Lifts the range check for every address except search APIs and model servers. It does not allow another scheme. |
A resource reached through a machine running xixo link connects only to the machine’s own loopback address, and none of these settings widen that. See reaching through another resource and outbound connections.
A git resource accepts only the protocols in XIXO_GIT_PROTOCOLS, https by default. It runs git
with no file protocol, no credential helper, no global or system config, and no redirects, and
refuses a URL with a name or token in it.
Rendering pages
Section titled “Rendering pages”A snapshot renders an untrusted page in headless Chrome.
- The page opens in an incognito window. xixo turns the same-origin policy and site isolation back on, which the browser library turns off by default.
- New windows, permission prompts, the file system, notifications, speech, and pings are blocked.
- xixo intercepts every request the page makes.
data:andblob:pass.httpandhttpspass only if the address check allows them. Every other scheme,file://included, is aborted. - All traffic goes through a proxy on loopback that resolves, checks, and pins each connection. QUIC and WebRTC outside the proxy are off, so no connection skips it.
- A render has 120 seconds. The picture stops at 20,000 pixels high and 25 MB.
The app’s pages
Section titled “The app’s pages”Every page xixo serves carries a Content-Security-Policy:
- Script runs only from xixo’s own origin, or inline with a nonce made for each page.
- Pictures load from xixo,
data:andblob:addresses, and the tenant’s masks issuer, which serves avatars. Requests go only to xixo. - No plugin loads,
<base>cannot move relative links, and no other site may frame a page. - Inline styles are allowed, since the interface library sets them.
Serving files
Section titled “Serving files”/references/:id/content streams a file’s bytes and needs xixo:catalog:read. A file can be an
HTML page someone kept, an SVG from an email, or anything a sync found, so xixo treats every file as
hostile.
- Every response carries
X-Content-Type-Options: nosniffand aContent-Security-Policyofsandbox, which runs no script and gives the document an opaque origin. - Raster images, video, audio, PDF, plain text, markdown, CSV, and JSON open in the browser. Every other type, HTML and SVG included, downloads.
- A PDF is served without the sandbox, because Chrome refuses to start its viewer inside one.
Active Storage’s own routes are not drawn, so staged bytes are reached only through xixo.
- Every path is cleaned before anything is stored. Backslashes become slashes, control characters
are removed, and empty,
., and..segments are dropped, so a key cannot point outside the place it is stored. - A resource reads only what it was attached to. Its prefix, folder, repositories, channels, mailbox, or query bound every command and every sync, even where its credential reaches further.
- An id or path a caller names is sent percent-encoded, one segment at a time. A
.or..segment is refused before any request is made. - A folder on a machine is read and written only by xixo link, inside the folders its own configuration shares. xixo link refuses a link anywhere on a path and writes only to a folder the configuration marks writable.
Reading files
Section titled “Reading files”The server never parses a file’s bytes. xixo link does, so a file
built to exploit a parser reaches nothing of the catalog or its database. xixo link runs in a
container or a systemd sandbox, and every program it runs on a file, such as ffmpeg or
tesseract, has a memory limit and is killed with everything it started when it runs past its time.
The server keeps only the steps it knows from xixo link’s answer, and cuts long text itself.
xixo link updates only to a build xixo serves. It downloads from the xixo address in its own configuration, follows no redirect, checks the SHA-256 xixo sent, and refuses an older version unless xixo says it is rolling back. On Linux a second system user owns the binary, so a program a file took over cannot replace xixo link. See the xixo link README.
Models and prompt injection
Section titled “Models and prompt injection”A file, a page, or an email can hold text written to steer a model. xixo limits what that text can do:
- The summary prompt fences the file’s text and tells the model it is data. The prompt that answers a question fences the question and the evidence the same way.
- A question about the catalog is answered with no tools. Arithmetic over a table runs in xixo, and the model only names the operation. xixo sends back once an answer with a number that is not in the evidence.
- Each agent run has a grant of its own with narrow scopes. No agent can sync, export, write into a resource, call an attached MCP server, or change settings. See the agent.
- An agent run reads from the catalog or from the web, never both, so text that tells it to send what it read somewhere has nothing to send or nowhere to send it. See catalog or web.
- An agent’s writing tools change only the feeds its run made, and the feed a filing or scheduled run is for. A page that tells the agent to rewrite a note has no effect.
- A machine’s tools take no command line, program, or address.
Errors
Section titled “Errors”An error often names the address it failed on, and an address can hold a credential. xixo removes
the name and password from every address in an error, and replaces the value of every query
parameter whose name contains token, key, sig, secret, passw, pwd, credential, auth,
session, or code with [redacted].
Errors are scrubbed when xixo raises them, and again wherever xixo keeps or sends one, so an error from a library is covered too. That includes check errors, run and analysis errors and logs, audit events, MCP tool errors, GraphQL errors, and failed downloads.