LavaMoat
at Secure the Web Forward
@naugtur, 2023
## Problem statement --- ![](i0.png)
In the beginning, there was software we typed into our computers
--- ![](i1.png)
Oh no, There's someone in my network and I don't trust them!
--- #### We invented ## firewalls --- ![](i2.png)
Oh no, There's someone in my browser and I don't trust them!
--- #### We invented ## Same Origin Policy --- ![](i3.png)
Oh no, There's someone in my codebase and I don't trust them!
--- #### We invented ## hoping for the best --- #### What we need is # 📦🤝📦 ## Fearless Cooperation --- ## Progress - Subresource Integrity - Content Security Policy - Trusted Types - Hardened Javascript --- ## Hardened Javascript - Compartment proposal(s) in TC39 - SES Shim - LavaMoat --- ![](i4.png) --- ### JS design is good for security? - Take ECMA + W3C - Add Conway's Law - Separation between language and APIs - Power only reachable through scope - Compartment controls scope --- ![](i5.png)
You decide which powers to pass in
--- ![](i6.png)
So are we done?
--- ### Problem statement ++ - Any access to DOM leaks globalThis - Compartment depends on evaluators or bundling - `strict-dynamic` but for `eval`? - same origin realms (tomorrow) --- ### Call to action How can we support the users of Hardened Javascript in the browser?