The extension permissions API already offers enough restrictions. As a user, I simply do not install extensions that need access to all pages, or I only enable them on pages where I need them.
The extension permissions API already offers enough restrictions. As a user, I simply do not install extensions that need access to all pages, or I only enable them on pages where I need them.
It’d be much more secure to allow the extension to do that without requiring it to put this into the page.
For example, currently you have the DOM of the page, and the extension’s UI is injected into it.
It would be preferable if you’d treat each tab as if it was like
<tab>
<browser src="actualpage"/>
<overlay src="extension1"/>
</tab>
This way an extension that wants to show secure UI on top could do it, and style it, but without it being accessible to the page itself.I think you could use the Shadow DOM in closed mode to prevent any information from leaking. [1]
[1]: https://blog.revillweb.com/open-vs-closed-shadow-dom-9f3d742...
Ideally you’d want to allow addons to modify pages in a way that pages can not detect or interfere with.
(e.g., some newspapers used to run JS to remove the AdBlock "block this" UI whenever you tried to remove an ad)
An extension can stuff its UI within an iframe that the host page can't manipulate, but that does come with some UI limitations.
If it’s a message in the browser chrome itself, and not as <div> in the page, it is possible to add distinguishing UI.
With the current system, it’s literally impossible to distinguish the UI