by bhouston · 3y ago · 0 comments
Instead of direct JavaScript includes I now recommend just putting it in an iframe and I share example code on the homepage.
This lets me still update the script while also ensuring it can not access cookies or other things in the main page context.
What do you think?
Wrapping the script tag in a iframe does not accomplish this as far as I can tell.
So the iframe sandbox deals with the security issue is a different fashion.
Also the iframe can not block the main pages so it has even less impact on the main page experience.
This is as secure now as the majority of ads served on the web.
---
EDIT: That might have been too cynical. Let me take another stab:
That opens up some cool new possibilities, but also a seemingly large new attack surface.
Does anyone know what's been done to mitigate it?
The mitigations, however, feel rather light given the exposure.
Would it make sense for GPU access to be a permission that users have to explicitly grant?