Security
Sandboxed by design.
Running code you did not write is the risky part of building with an assistant. Here is exactly what the studio does and what it will not do.
What the studio can do
- Run your project's scripts inside a sandboxed frame
- Show console output and errors from that frame as text
- Save your projects in this browser's local storage
- Send the files you tick, with your request, to the assistant (only when you press Ask)
- Ask your wallet to sign one transaction: anchoring a snapshot hash
What it will never do
- Let preview code reach the network, this page, your cookies or your wallet
- Apply a change you did not tick
- Upload your projects anywhere on its own
- Ask for a seed phrase, a private key or a token approval
- Put your code on chain (only a hash, counts and a label)
- Send you a direct message first
Scripts only, opaque origin
The preview iframe has sandbox="allow-scripts" and nothing else: no same-origin, so it cannot read anything that belongs to this site; no forms, popups or top navigation.
A policy with no network
Every run starts with a content security policy that blocks fetch, external scripts and stylesheets, frames and form posts. Images over https still load.
Messages checked twice
Console lines are accepted only from the preview's own window and only with the random token of the current run. Old runs cannot write into the console.
Model output is parsed, not trusted
Assistant answers must be one JSON object with file paths and contents. Paths and sizes are checked, everything else is rejected, and the result is still only a draft.
The preview policy, verbatim
default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: blob: https:; font-src data:; media-src data: blob:; connect-src 'none'; form-action 'none'; frame-src 'none'; base-uri 'none'