fix(apps): close WebRTC/preconnect egress from mini-app views before any third-party view renders
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with contracts/app-view/README.md and the desktop escape test referenced by the issue; compare how view and proxy frames behave across WebView2, WKWebView, WebKitGTK, and supported web browsers. The issue requires a design that blocks WebRTC and preconnect egress while preserving host page connections, then passing the escape checks and documenting the enforced policy.
Written by the indexing model from the issue text.
Description
Problem
Mini-app views render inside the shared sandbox proxy (contracts/app-view/). The proxy's content policy stops fetches, subresource loads, frames and navigation, but two channels are not governed by that policy and still reach the network from both the view frame and the proxy frame:
- WebRTC ICE gathering (
RTCPeerConnectionwith STUN/TURN servers the page chooses) <link rel=preconnect>connections
Browsers do not apply connect-src or default-src to either channel. The result is that a view can contact hosts and ports of its choosing without any request the policy would block, and nothing is visible in the panel.
Verified on Windows (WebView2 158) with the desktop escape test's harness, one loopback sink per frame: the view frame, the proxy frame and the host page all reached their sinks over both channels. The same behaviour is expected on the web host, since it comes from the engine, not from the desktop scheme.
Impact today
Low. Only the bundled first-party sample view renders (demo builds only). This is still the isolation boundary the proxy contract promises for every future view, on web and desktop.
Required before any third-party view renders
Close these channels for view frames, or record an explicit owner decision that accepts them with a bounded policy, before any third-party or untrusted view can render. The apps-isolated and apps-community capabilities stay dark until this issue is closed.
What was checked
- CSP
webrtc 'block': defined in CSP Level 3, not implemented in Chromium or WebKit (unrecognized directives are ignored). The escape test records the WebView2 result. - Permissions-Policy and the iframe
allowattribute: no feature coversRTCPeerConnectionor preconnect. - WebView2 browser arguments (WebRTC IP handling, feature switches): they apply to the whole browser process, so they would also change the main window. Not acceptable without a separate decision.
- Removing the WebRTC constructors with an init script in subframes: only Windows injects init scripts into subframes today, a removal can be undone from another realm, and it does nothing for preconnect.
None of these holds on WebView2, WKWebView and WebKitGTK together, so this needs its own design.
Acceptance criteria
- On each engine that renders views (WebView2 first; WKWebView and WebKitGTK when views open there; the web host's supported browsers), neither channel reaches a loopback sink from the view or the proxy frame, while a host-page control still does.
- The desktop escape test's "known gap" checks for WebRTC and preconnect become ordinary passing checks.
contracts/app-view/README.mdstates exactly what the policy enforces.
Related
- #85, #93 (separate content origin and desktop frames)
- #133 (shared proxy contract), #134 (desktop scheme and escape test)
- Dominant language
- No language data
- Stars
- 1
- Forks
- 2
- Avg merge
- 1h 51m
- Merged PRs (30d)
- 103
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextlevelbuilder/dewee-desktop-app
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
nextlevelbuilder/dewee-desktop-app#277 · 1 comment ·
Maintainers usually reply within 1 day
-
bug in progress
Difficulty 3/5 1-2 days Newbie friendliness 72/100
nextlevelbuilder/dewee-desktop-app#271 · 1 comment ·
Maintainers usually reply within 1 day
-
PWA update: navigations and precached files can still hold activation after SKIP_WAITINGPossibly taken @mrgoonie claimed this today. Open
nextlevelbuilder/dewee-desktop-app#270 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
PWA update: ordinary fetches during SKIP_WAITING can still delay activation past the fallbackPossibly taken @mrgoonie claimed this today. Open
nextlevelbuilder/dewee-desktop-app#261 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 39/100
nextlevelbuilder/dewee-desktop-app#256 ·
Maintainers usually reply within 1 day
All issues in nextlevelbuilder/dewee-desktop-app
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
storytold/photocraft#20056 ·
Maintainers usually reply within 1 day
-
area:doc bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
bherbruck/solvecraft#26051 ·
-
bugfix
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
storytold/designcraft#3662 ·
Maintainers usually reply within 1 day
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ynput/ayon-equalizer#46 ·
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day