Security model
This describes what the code does. It has not been reviewed by an outside party, and Ring does not claim to be audited.
Secrets
- Provider keys, the database URL and the RPC URL are read from the server environment only.
- No secret is sent to the browser. The capabilities the browser receives say whether a provider is configured, never how.
- A configured RPC URL may embed a key, so only its host name is ever shown or stored.
- Error text is masked for anything that looks like a key, token, bearer header or connection string before it is stored or logged. Unexpected errors are stored with a generic message.
Sessions and ownership
- A session is a random 256-bit token in an
HttpOnly,SameSite=Laxcookie (alsoSecurein production). The database stores only a hash of it. - A first run creates a guest session tied to the browser. Wallet sign-in creates a wallet session and moves the guest's runs and workflows to the account.
- Sign-in uses an EIP-4361 message with a single-use nonce bound to the address, the site's domain and chain 99901, valid for ten minutes. Signatures are verified on the server (locally for ordinary accounts, through the RPC for contract wallets).
- Every query that serves a visitor filters by owner. A run or workflow that belongs to someone else returns "not found", the same as one that does not exist.
- Publishing, saving to an account, editing a listing and the creator dashboard require a wallet session. Hiding someone else's listing requires an operator address (
RING_OPERATOR_ADDRESSES). - State-changing requests must come from the site's own origin.
Workflow definitions cannot run code
A definition is data. Skills are selected by id from a fixed registry, settings are checked against per-skill schemas that reject unknown keys, and a Condition Gate's path is a property lookup. There is no expression language, no script step and no template evaluation.
Fetching URLs
URLs in a workflow are untrusted. The fetcher:
- allows
httpandhttpsonly, on ports 80 and 443, without embedded credentials; - refuses loopback, private, link-local (including cloud metadata addresses), carrier-grade NAT, multicast, documentation and reserved ranges, for IPv4 and IPv6, including IPv6 forms that embed an IPv4 address;
- resolves host names itself and checks the result at connect time, so the address that was checked is the address that is dialled; a name is refused if any of its addresses is private;
- follows redirects by hand, at most four, re-checking every hop;
- reads at most 1.5 MB, for at most 12 seconds, and accepts text-like content types only;
- sends no cookies and no credentials.
Fetched markup is parsed to text and discarded. Scripts, styles and frames are skipped; nothing is executed.
Retrieved content and the model
Retrieved text is data, not instructions. It reaches the model inside a marked block, after rules that say so, with anything that could close the block removed. AI steps have no tools. This lowers the risk of prompt injection; it does not remove it.
Rendering
Step output is rendered as React text, or as Markdown through a renderer that does not interpret HTML, drops images, and limits links to http, https and mailto. The Content Security Policy allows scripts, styles, images and connections from the site's own origin only.
Abuse limits
- Rate limits per owner and per address on run creation, advancing, saving, publishing and sign-in, stored in the database so all instances share them.
- Two open runs per owner; twelve steps per workflow; size limits on every input.
- One automatic retry per step, two manual retries per run.
Known gaps
- Published listings are not reviewed. An operator can hide one; there is no moderation queue or reporting flow.
- The IP used for rate limiting comes from the proxy's forwarding header and is only as trustworthy as the hosting platform makes it.
- The guest session is a bearer cookie: anyone with access to the browser profile has the guest's runs.
- There is no account recovery, because an account is a wallet address.