WICG / isolated-web-apps

Repository for explainers and other documents related to the Isolated Web Apps proposal.
Other
223 stars 19 forks source link

Isolated Contexts spec review #42

Open domfarolino opened 4 months ago

domfarolino commented 4 months ago

@chrishtr asked me to take a look at the Isolated Contexts spec. After checking it out, here's some of the feedback I've come up with:

Editorial feedback

domfarolino commented 4 months ago

See https://github.com/whatwg/html/issues/6127#issuecomment-2248571068 where I propose a future where all agents/clusters are explicitly owned by a BCG, so maybe to satisfy this point for now we can just add a red class=XXX box below this part of the spec here, mentioning that this link isn't quite clear until 6127 is fixed.

Actually I think I take this part back given the more recent discussion on that thread. Since top-level worker environment settings objects can span multiple BCGs, there is no single BCG that an ESO can be relied upon associating with, so I think this part of the spec needs to be re-thought.

robbiemc commented 4 months ago

Thanks for reviewing it Dominic! I address most of your feedback in #43, but I'm still thinking through the BCG issue.

No, the goal is to only load known scripts, which this achieves through forcing them into separate resources and integrity checking all resources. unsafe-eval or unsafe-inline would allow dynamic script injection/execution which would trivially bypass integrity checks. wasm-unsafe-eval is needed to get wasm to work at all, but doesn't introduce the same security issues as unsafe-eval because wasm has to proxy through js to access any capabilities. There's the possibility that the js bindings to the wasm blob could provide direct access to capabilities, but we consider that a similar threat to developers shipping a js interpreter in their app and using that to get eval, which we can't defend against from a purely technical level.