ext-apps/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Olivier Chafik 8b09f4278c
fix: proper CSP handling in basic-host sandboxing (HTTP headers, worker-src, document.write) (#234)
* fix: Move CSP to HTTP headers + add worker-src, frameDomains, baseUriDomains, permissions

Security improvements:
- CSP is now set via HTTP headers in serve.ts instead of meta tags
  (meta tag CSP can be tampered with by same-origin content)
- CSP passed as query param to sandbox.html for header-based enforcement

New CSP/permissions features (borrowed from PR #158):
- frameDomains: control frame-src directive for nested iframes
- baseUriDomains: control base-uri directive
- permissions: camera, microphone, geolocation via iframe allow attribute

WebGL fix:
- Use document.write() instead of srcdoc for inner iframe content
  (srcdoc creates opaque origin that breaks WebGL canvas updates)
- Add worker-src directive with blob: support (critical for WebGL apps
  like CesiumJS/Three.js that use workers for tile decoding, terrain
  processing, image processing)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: Remove permissions support (defer to PR #158)

Keep this PR focused on CSP security fixes only.
Permissions (camera, microphone, geolocation) will be
handled in #158.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* cleanup McpUiResourceCsp type usage / duplicate defs

* fix: guard against CSP injection in domain parameters

Validate CSP domain entries to reject characters that could:
- Break out of CSP directives (semicolons, newlines)
- Inject CSP keywords like 'unsafe-eval' (quotes)
- Inject multiple sources in one entry (spaces)

This prevents injection attacks where malicious domains could
override the security policy.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 14:32:48 +00:00
..
basic-host fix: proper CSP handling in basic-host sandboxing (HTTP headers, worker-src, document.write) (#234) 2026-01-11 14:32:48 +00:00
basic-server-preact chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
basic-server-react chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
basic-server-solid chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
basic-server-svelte chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
basic-server-vanillajs chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
basic-server-vue chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
budget-allocator-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
cohort-heatmap-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
customer-segmentation-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
integration-server feat: publish example servers to npm (#184) 2026-01-08 20:08:50 +00:00
qr-server Add safeAreaInsets support to all example apps (#202) 2026-01-08 18:03:13 +00:00
scenario-modeler-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
sheet-music-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
system-monitor-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
threejs-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
video-resource-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
wiki-explorer-server chore: release 0.3.1 (#224) 2026-01-09 18:22:27 +00:00
run-all.ts refactor(examples): use concurrently API for proper process cleanup (#128) 2025-12-11 14:04:39 +01:00