I don't get it. is this surprising or unusual or a security issue?
It's not like "include a script in a page, then execute arbitrary js on any tabs of anyone who visits that page".
That would've been a CVSS 10.
if (typeof window.tabgod === 'function') {
tabgod(
(tab) => tab.url === 'https://bankofamerica.com',
() => { /* absolutely nothing good */ },
}
}
Keep in mind any network requests running from the script directly in the page will happily send your cookies, so this makes it trivial to gain unauthorized access to people's accounts. Any site you visit while running this extension can basically access your private data from every other site you happen to have a tab open for, and send requests impersonating you. It could also install a keyboard logger, etc.https://github.com/devidw/tabgod/issues/1#issuecomment-19336...
But from reading the description it says in all devtools consoles - so I had assumed it was only in devtools context that the function was available?
I was thinking more along the lines of breaking out of process/site isolation or sandboxing - but yeah, you're making a good point.