Skip to content

Add secure read-only browser companion - #54

Open
gustavonline wants to merge 1 commit into
diffusionstudio:mainfrom
onlinesourdough:codex/diffusion-upstream-browser-companion-r6
Open

Add secure read-only browser companion#54
gustavonline wants to merge 1 commit into
diffusionstudio:mainfrom
onlinesourdough:codex/diffusion-upstream-browser-companion-r6

Conversation

@gustavonline

Copy link
Copy Markdown

Summary

  • Adds dapi browser for opening the exact packaged editor UI inside harnesses such as the Codex built-in browser.
  • Keeps Electron authoritative for project opening, canonical compilation and watch, filesystem and DAPI, export, and AI. The browser receives a narrow read-only snapshot and a view-state-only interaction surface.
  • Reuses apps/web rather than copying editor UI, with exact canonicalCompiled, hostApplied, and browserApplied revision and bundle-hash linkage before readiness.

Security boundary

  • Binds a random 127.0.0.1 loopback listener; authenticates one renderer with a one-time fragment capability that is cleared after use; and enforces the exact HTTP and WebSocket Origin.
  • Runtime-validates the protocol, schema, app/build handshake, and narrow snapshot allowlist, failing closed on mismatches.
  • Blocks and audits non-loopback browser and hidden-host network attempts. The reviewed acceptance run observed zero egress attempts.
  • Exposes no browser DAPI or Electron bridge, filesystem or persistent mutation, export, AI/cloud/auth/checkout, or telemetry path.

Verification

  • Reviewed automated coverage includes CLI protocol tests; desktop security, capture, and lifecycle integration tests; web authority, capabilities, export, fonts, and protocol tests; and runtime cache-observer and web-font-policy tests.
  • A real representative macOS Phase A project was exercised in the Codex built-in browser. The session reached ready only after exact canonical, host, and browser apply identity matched; the Electron host stayed hidden, inspection/playback/scrub worked, authoring remained disabled, and the network audit remained at zero egress attempts.

Phase A limitations

  • Code-native projects only: no browser media materialization or media-byte/path bridge.
  • <html> and htmlPaint are unsupported in ordinary Chromium.
  • No browser-side writes or edits, scene or frame export, or AI/generation.
  • WebGPU and local-font behavior are browser-dependent. This does not claim malicious-project sandboxing, large-file streaming, or cross-platform Electron packaging parity.

Related to #52

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

@gustavonline is attempting to deploy a commit to the Diffusion Studio Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant