Skip to content

Commit 6266569

Browse files
committed
clean up more
1 parent a7bc1f6 commit 6266569

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

content/blog/security.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ allow-scripts
3434
allow-downloads
3535
allow-forms
3636
allow-pointer-lock
37-
allow-popups
38-
allow-popups-to-escape-sandbox
39-
allow-modals
4037
```
4138

4239
The one that's **not** there is the important one: `allow-same-origin`. If we added that single attribute, the entire isolation model collapses. The iframe would share the parent's origin and gain full access to Tauri APIs. This invariant is tested in CI. We never want to see that ship.
@@ -45,8 +42,7 @@ If someone sends you a notebook with a cell that has hidden javascript:
4542

4643
```html
4744
<script>
48-
// Try to access the host application
49-
window.__TAURI__.invoke('execute_command', { cmd: 'rm -rf /' });
45+
window.__TAURI__.invoke("approve_notebook_trust")
5046
</script>
5147
```
5248

@@ -58,6 +54,8 @@ You might wonder — if outputs are isolated, how do interactive widgets work? T
5854

5955
We built a JSON-RPC 2.0 bridge over `postMessage`. The parent window owns the widget state (stored in an Automerge CRDT document, synced with the daemon). The iframe gets a proxy that can read and update model state, but only through the validated message channel. The iframe never gets direct access to the kernel, the daemon, or any Tauri API.
6056

57+
{/* Include slick widget cross window video here */}
58+
6159
Widget state updates are validated, typed, and routed through a `CommBridgeManager` that acts as a gatekeeper. Even [anywidgets](https://anywidget.dev/) run inside this same isolation boundary.
6260

6361
### Content Security Policy

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const withMDX = createMDX({
1414
[
1515
rehypePrettyCode,
1616
{
17-
theme: "github-light",
17+
theme: "github-dark",
1818
keepBackground: false,
1919
defaultLang: {
2020
block: "text",

0 commit comments

Comments
 (0)