Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is this secure? Seems like this PageAgent could be the user pretty easily and cause all kinds of problems.


Could you elaborate on what kind of security problems you’re referring to? Like hallucination?


The PageAgent has access to the security tokens of the currently logged in user. They can do anything the user can on the site, including become them. What is to prevent the PageAgent from being exploited and send these security tokens elsewhere? It would be trivial for some other package to look for your PageAgent and override key functions, and then it is all over.


PageAgent operates at the HTML/DOM level with the same privileges as any other JavaScript running on the page and nothing more. The security token concern you're describing applies equally to every third-party script, npm package, or browser extension that runs in-page. It's not unique to PageAgent.

The browser extension can be more risky because it's more privileged. I've designed a simple authorization mechanism so that only pages explicitly approved by the user can call the extension.

That said, I'd welcome more eyes on this. If anyone wants to review the security model, the code is fully open source.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: