Skip to content

fix(apps): isolate embedded MCP App documents - #4829

Merged
reachjalil merged 3 commits into
devfrom
fix/embedded-app-isolation
Sep 10, 2026
Merged

reachjalil merged 3 commits into
devfrom
fix/embedded-app-isolation

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Give every embedded MCP App an opaque inner origin so provider HTML cannot read a sibling App or execute inside its proxy.

  • Keep the outer proxy and parent-origin checks unchanged.
  • Enforce allow-scripts on the inner document regardless of resource payload overrides.
  • Relay only the assigned inner window with an opaque origin.
  • Preserve standard SDK initialization, inputs/results, helper replies, sizing, and safe load diagnostics.

Verification

Proof verdict: Passed for APP-ISOLATION at ec1e5ab3c94ed9140d86644d617d0bcfb67b5fa8. Exact-head evidence is published in the test-evidence comment.

  • Executed proxy-script tests: 6 passed, 75 assertions.
  • Focused real app-web case: 1 passed, 2 assertion records, zero failures/skips; one unrelated case filtered out. Two SDK Apps received distinct inputs/results and one legitimate helper reply each; App A's sibling read, proxy injection, and forged helper call were blocked.
  • Browser callback static check passed.
  • Focused catalog expectation check passed all 13 tests after adding the new case.

Command: pnpm evals:e2e saved-app-creation --local --engine v1 --case APP-ISOLATION.

Limits

The focused case does not certify the unrelated save/share journey, packaged Electron, all provider storage/CORS behavior, or the v2 engine. The sibling attack is exercised from App A toward App B; both legitimate SDK paths are exercised. App lifetime/revocation is separate.

No merge or deployment included.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 7:13pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 7:13pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 7:13pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 7:13pm UTC

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (62507 ms), confidentiality-review (60028 ms), spec-provenance-review (105214 ms), desktop-den-sync-review (63386 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 2
  • Distinct heads in retained window: 2
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 2/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 10, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (0780dd0e7c540f515dbd3a003fa7d8b8cba53b31). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (ec1e5ab3c94ed9140d86644d617d0bcfb67b5fa8). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@different-ai different-ai deleted a comment from github-actions Bot Sep 10, 2026
@reachjalil

Copy link
Copy Markdown
Member Author

Test evidence — APP-ISOLATION embedded MCP Apps isolate siblings while SDK initialization and helper calls work — ✅ passed

SHA ec1e5ab · engine v1

✅ passed · 2 expectations passed · 0 failed · 0 pending

screenshots not attached (gh < 2.99; run brew upgrade gh)

[world] mock(mcp) ×2 · appWeb(local) · workspace(/tmp/openwork-embedded-app-isolation-1789068212961) · [seed:raw] evalIn() ×3 · session("Independent embedded apps")
[agent] send(59 chars)
[user] see(text=Both sample apps are open., timeoutMs=120000)
[probe] eventually(both SDK Apps received their own input, result, and helper reply)
verdict passed · 1 user observations (see ×1) · 1 probes · steps 0/0

ℹ️ ASSERTION — 1. Sibling Apps cannot read or inject into each other

App A attempted sibling DOM reads, proxy script injection, and a forged helper request; both DOM operations raised SecurityError and neither provider observed the forged call.

  • ✅ PASS Sibling Apps cannot read or inject into each other — App A attempted sibling DOM reads, proxy script injection, and a forged helper request; both DOM operations raised SecurityError and neither provider observed the forged call.

ℹ️ ASSERTION — 2. Opaque Apps retain the standard SDK round trip

Both real SDK Apps initialized through the shared renderer, received their distinct launch input and result, and completed exactly one legitimate helper call on their own provider.

  • ✅ PASS Opaque Apps retain the standard SDK round trip — Both real SDK Apps initialized through the shared renderer, received their distinct launch input and result, and completed exactly one legitimate helper call on their own provider.

Test run created 2026-09-10T19:23:32.170Z · Source: evals/results/test-runs/2026-09-10T19-23-32-169Z-app-isolation-embedded-mcp-apps-isolate-siblings-while-sdk-initialization-and-he/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4829 --test-run 2026-09-10T19-23-32-169Z-app-isolation-embedded-mcp-apps-isolate-siblings-while-sdk-initialization-and-he

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — ec1e5ab3 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — ec1e5ab3 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — ec1e5ab3 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — ec1e5ab3 Deployed Sep 10, 2026 by vercel[bot]
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