Skip to content

Trust

Dashboard isolation

A published dashboard is author-written HTML, sandboxed from your Dashies session and from ordinary third-party requests. What that costs, precisely.

A Dashies dashboard is arbitrary HTML that somebody's AI wrote. It is supposed to run scripts: that is how the charts draw. So the interesting question is not whether script runs, but what it can reach.

The problem being solved

Published dashboards are served from the same domain as the Dashies app. Without a countermeasure, a script inside anyone's dashboard would share an origin with the application, and could read a viewer's stored session token, their cookies, and make authenticated requests as them. Opening a colleague's dashboard would be enough.

The countermeasure

Every dashboard is served with a Content-Security-Policy header that opens with:

Content-Security-Policy: sandbox allow-scripts; default-src 'none'; ...

The sandbox allow-scripts directive puts the document in an opaque origin. It gets a fresh, unique origin that matches nothing, including the application's. Scripts run, because allow-scripts is opted in. Nothing else is. The directives after it are the network lock, described under only Dashies below.

Concretely, and these are properties the dashboard runtime itself is written around:

  • No storage of any kind. localStorage, sessionStorage, cookies, and IndexedDB are all unavailable. An opaque origin has no storage to belong to.
  • No same-origin authenticated request. A request back to the Dashies application is cross-origin from an opaque origin and carries no session.
  • No new windows or tabs. Opening an auxiliary browsing context is not granted, so a link with target="_blank" is silently swallowed.

Published dashboards additionally refuse to be framed at all, so an attacker's page cannot wrap a members-only body and harvest what a tricked viewer clicks.

The one place Dashies frames a dashboard itself, the version preview inside the app, keeps the sandbox exactly as it is and relaxes only who may frame it, to the Dashies app and nothing else. A previewed dashboard is no less isolated from the app than a served one.

What it also does: only Dashies

The sandbox above is isolation from your Dashies account. On its own it does not confine the page: an opaque origin can still fetch any origin it likes, so a dashboard holding a viewer's rows could once send them anywhere.

Every dashboard response now also carries fetch directives that close that:

default-src 'none'; script-src 'unsafe-inline' 'wasm-unsafe-eval' https://data.dashies.ai;
connect-src https://data.dashies.ai; img-src data: blob:; font-src data:;
style-src 'unsafe-inline'; worker-src blob:; base-uri 'none'; form-action 'none'

The one host a dashboard reaches for data is the Dashies data domain, which serves the query engine, the row-level engine and its data files (the Dashies apex is also allowed, for the favicon). Every other background fetch channel is refused: fetch, XMLHttpRequest, sendBeacon, WebSocket, EventSource, and any third-party image, font, stylesheet or script. The publish check also warns when a page's own script calls the network, so the author learns the call will fail.

Two channels a page policy cannot close, named here rather than implied by "locked":

  • The page navigating itself. A top-level document may always navigate its own tab, so a script can send location to another URL with data in it. No CSP directive closes this. It is not silent: the viewer's tab visibly leaves the dashboard. Form submissions and new tabs, by contrast, are refused.
  • WebRTC. RTCPeerConnection reaches a STUN or TURN server over UDP, outside every fetch directive, and no CSP directive disables it. So Dashies closes it twice, neither time with the policy: publish refuses any page script that names it, and on a page published since that check, a script Dashies places first in the page removes the constructor before any of the page's own script runs. A frame could bring a fresh copy, so publish also refuses every frame, embed and srcdoc in a page.

Two other channels the CSP cannot close are instead refused at publish, so a served page never carries them: a <script type="speculationrules"> block (which would prefetch a URL outside the fetch directives) and a <link rel="prefetch">, "prerender", "preconnect" or "dns-prefetch" pointing off Dashies.

So the guarantee is precise: every ordinary background fetch to a third party is refused, the speculative-load channels and WebRTC are refused at publish, and the only open residual is the self-navigation above (visible). A publish check reads code and cannot be proof against every way code can be written, so this is not a promise that a determined script holding a viewer's rows can send nothing anywhere.

The practical consequence: a published dashboard should still be treated as code you are running, on the same footing as any other HTML somebody handed you. If you would not open an untrusted colleague's HTML file, do not open their dashboard either. This is why arbitrary script inside a dashboard is not itself treated as a vulnerability, while anything that lets that script reach the application, a viewer's credentials, or another tenant's data very much is.

The compatibility cost

Isolation is not free, and the cost lands on the author.

Anything relying on browser storage breaks. A dashboard that tries to remember a viewer's preferred filter in localStorage, or set a cookie, will throw rather than silently no-op. There is no way to opt out per dashboard.

This is why the runtime keeps active filters in the URL hash instead. A filtered view is a shareable link that survives a reload, which turns out to be the better design anyway, but it is a design forced by the sandbox rather than chosen freely.

Links that open a new tab do not open one. If your dashboard links out to a source system, use an ordinary same-tab link and test it, rather than assuming target="_blank" behaves as it would on a normal page.

No plan changes this. A published dashboard carries no "Powered by Dashies" badge on any plan and its sandbox is never relaxed for one, so target="_blank" is swallowed on every plan alike.

Anything expecting a normal origin should be tested, not assumed. The document only receives capabilities the header opts into, and the header opts into scripting. If you are reaching for a browser feature beyond drawing and interaction, publish a small test dashboard and confirm it works before building on it.

Where the data lives

For most dashboards the numbers are inline in the file itself, so isolating the document isolates the data with it.

When a dataset is too large to inline, it is served as a separate file from a different domain. That split is deliberate: it keeps the dashboard document cross-origin to the app, which is what preserves everything above.

A dataset served this way is protected by a signed link with a four-hour life, minted only while serving the dashboard to somebody already authorized to see it. There is no endpoint that will sign a link on request, so there is no way to get one without already having the access it grants. Any bad or expired signature gets the same refusal, with nothing distinguishing which kind of bad it was, and private responses are never stored in a shared cache where they could be replayed.