Live data from Hacker News

Browser extensions are underrated: the promise of hackable software (2019)

geoffreylitt.com

141–150 of 320 posts

Re: Browser extensions are underrated: the promise of hackable software (2019)

#141

Is there a way to use browser extensions safely? Any extension that looks interesting needs access to everything I see on the screen (and even modify it), which to me seems a huge security risk. My understanding is that random extension is able to read and send somewhere almost all my data when I read my email, do online banking, etc. Do I understand correctly the situation?

>My understanding is that random extension is able to read and send somewhere almost all my data when I read my email, do online banking, etc. Depends on the permissions requested by the extension but often yes. The permission "Can read all data on any webpage" means exactly that. > Is there a way to use browser extensions safely? Yes. Depending on your paranoia /security standards. Here's what you can do ( ordered b…

So the current options are 1. don't use extensions - this limits comfort and productivity, and the entire purpose of extensions 2. use extensions but lose security (are you feeling lucky today? what about tomorrow?)

This seems so dumb. Is this the best solution from google/mozilla/etc? I am thinking that an option to disable all extensions on a particular site/tab could solve many issues, maybe even with default on for well known email and bank providers. This would encourage ppl to install more extensions because they don't care what happens when they just read reddit.

Re: Browser extensions are underrated: the promise of hackable software (2019)

#142
One benefit I would add is that cross platform support is great for browser extensions. Browsers already run on different OS's and devices. Browser API and extension API are fairly uniform among the major browsers. It's close to the cross platform support of general websites.

As an experiment I develop my latest browser extension on Firefox [1], Chrome, and Edge [2] at the same time to see how difficult it is to share the same code base. The difference is minuscule, like less than 0.01%. Chrome and Edge are essentially the same. Firefox is a bit behind in Manifest V3 support and needs a few lines Firefox specific API calls. The manifest files have a few differences. Overall, sharing the same code base is very feasible.

[1] https://addons.mozilla.org/en-US/firefox/addon/one-page-favo...

[2] https://microsoftedge.microsoft.com/addons/detail/one-page-f...

Edit: You might ask where the Chrome version. Well, I had a heck of time to create a new Google account for deployment. Stay tune.

Re: Browser extensions are underrated: the promise of hackable software (2019)

#143
post #139

"Computing is still young, and platforms are changing quickly. Modern browser extensions and smartphone platforms have only been around for about a decade. These platforms will evolve, and there will be new platforms after them, and we will get to collectively decide how open they will be." I really like this final comment. As a non expert in computing, I also often think about how young is this field, and I fantasiz…

> we will get to collectively decide how open they will be.

The author is way more optimistic than me here. I'd love if that were the case, but with the way the wind is blowing, I doubt that it'll be a collective decision between users and the big tech companies running today's computing platforms. If anything, it'll come through regulation.

It's highly unlikely that e.g. iOS or Android will suddenly and out of their own initiative open up their APIs in a way that would allow building anything like "reading mode"/distraction removers, ad blockers, data extraction allowing mashups between different apps etc.

Google's main customers aren't Android users, but app developers who run in-app ads and sell in-app purchases; the same is to a large extent also true for Apple (although DMA-like changes might shake up things a bit, and their reasoning for not introducing such apps will likely be security and platform integrity, not ads).

Re: Browser extensions are underrated: the promise of hackable software (2019)

#144
post #102

Earlier quoted context omitted.

Userscripts are underrated! I use them for all kinds of things, like fixing GitHub's useless landing page (taking me to my repositories instead), make the Mastodon "follow" button work (by hardcoding my instance's domain), block useless results from Google search results (stackshare and the like), redirect from the YouTube "short" view to the normal video video view, remove the stupid whitespace to the right of Gmail…

I've used Tampermonkey for a couple of moderately complex things and it does work well... I didn't come across a particularly nice way to use an external editor or integrate it with a normal dev workflow though, I wonder if anyone has tricks to share? I'm fairly satisfied with editing in VS Code, using a tsconfig.json with strict mode and checkJs turned on, then using JSDoc for typing. The ugly bit is the manual copy…

I don't use Tampermonkey (it's not FLOSS), but I'm pretty sure Violentmonkey autoreloads script files when that script was installed from a local file (maybe I had to enable it somewhere).

Re: Browser extensions are underrated: the promise of hackable software (2019)

#145
post #46

I wish browser extensions had more fine-grained permissions but it's a tricky problem verifying if software is using permissions maliciously (see the Obfuscated C Code Contest and the Underhand C Contest) and how to communicate nuanced permissions to users (most users don't read and/or understand tech stuff, and can be easily mislead). A tip in Chrome that I never see mentioned if you want to be extra safe when tryin…

Firefox user here, I wish Multi-Account Containers had a way to disable extensions per container. I don't need any on my banking site. Sure I could use separate Profile but UX hurts here.

I solved this problem by using Qubes OS. Different Firefox instances for different tasks run in dedicated VMs, with independent configs and extensions. It allowed to better organize my digital live and provided more security at the same time.

Re: Browser extensions are underrated: the promise of hackable software (2019)

#146
post #123

Earlier quoted context omitted.

You're free to use only extensions which are open source. So you can build them yourself, and also spot check changes in the code whenever there's a new upstream release.

That'd help, but a problem is they could still go closed-source and you wouldn't know - the store itself has no concept of open or closed source so it's not like you could check an "uninstall if it goes closed source" box. Maybe there's room for a browser extension that hosts other browser extensions but with a much better security model than what Google allows.

I think that'd be a great idea, an "FDroid for extensions": A store that serves exactly the code in the repo. Sadly I don't think Chrome/Firefox allow building this as an extension itself.

Re: Browser extensions are underrated: the promise of hackable software (2019)

#147

Earlier quoted context omitted.

Forget all that. 1. They increase the attack surface of the browser 2. They have routinely been transferred to (for money) or taken over by malicious entities 3. Often they subtly break things in ways that are fine for expert users but which result in support reach out by others The whole extension thing is a mess.

Ultimately, as a society, we have to decide what is more important: the best of us or the worst of us.

Framing it like that makes it much more simplistic than reality. While there are some people you can clearly place into "best" or "worst", most people fit somewhere along a spectrum where their placement changes day to day. You ever had a bad day where you forgot to do something you would have done any other day?

Do you want software that allows you to do anything on a good day but is potentially catastrophic on a bad day?

The answer may still be yes, but regardless it's a more complicated a question than best vs worst.

Re: Browser extensions are underrated: the promise of hackable software (2019)

#148
Post author here! I wrote this post five years ago. Since then, my conviction in the value of customizable software has only grown, but I've also updated my thinking in a few ways:

1) AI

AI is rapidly getting better at coding. Current AI is often bad at high-level architecture but is capable of making small local tweaks. Seems like a good fit for the kind of code you need to write a browser extension!

I'm exploring this direction; wrote more about it in "Malleable software in the age of LLMs" [1]

2) Security

Having talked to people who worked on various extension platforms including the browser extensions API, I see more clearly than I did five years ago that security is often the key bottleneck to deploying extension platforms meant for mass adoption. Anytime you want everyday computer users to be installing invasive extensions to important software from untrusted third parties, it's gonna be challenging to protect them.

That said, I still think that conversations around extensions tend to focus too much on security at the expense of all else. Customizability is important enough that it may be worth prioritizing it over security in some cases.

I also think there are many reasonable paths forward here. One is to exchange extensions with trusted parties -- e.g, coworkers or friends -- rather than installing from random people on the internet. Another might be to only build your own extensions; perhaps that'll become more viable with AI-assisted programming, although that introduces its own new security issues. And finally, I've met a few people who have smart ideas for architecting software in a way that helps resolve the core tensions; see [2] for an example.

3) Backend access as a key limitation

I've increasingly realized that the fact that browser extensions can only access client code in a fairly server-centric web means that many deep customizations are out of reach. Perhaps you can't read the data you want, or there's not a write API to do the thing you need.

While I'm optimistic about what extensions can do within the boundary of the client, this is an inherent limitation of the platform.

At Ink & Switch (the research lab I now work for), we're working towards local-first [3] software: collaborative software where the data and the code lives on your device. Among other benefits like privacy, we think this is the right foundation for more powerful extensions, since your data and the app code aren't locked away on a server.

[1] https://www.geoffreylitt.com/2023/03/25/llm-end-user-program...

[2] https://www.wildbuilt.world/p/inverting-three-key-relationsh...

[3] https://www.inkandswitch.com/local-first/

Re: Browser extensions are underrated: the promise of hackable software (2019)

#149

Many popular browser extensions were bought up by data brokers that use them to exfiltrate browser history, so not sure if they’re underrated, I think you have to be pretty careful as the extension security/privacy model is/was pretty awful. I e.g. know screenshotting extensions (Awesome Screenshot) that would vacuum up your browser history and send it to a data broker in Israel. So probably better to have that as a…

Yes. Because of this and the lack of fine-grained permissions mentioned by a sibling comment, I tend to use desktop apps where I can instead of extensions, keeping my extensions list quite slim — basically all I install are FOSS extensions by “big” known-good authors (e.g. Raymond Hill) or projects that aren’t going to sell out. Of course risks exist with desktop apps too, but historically this kind of buy-and-exfilt…

The bar to write secure desktop software is significantly higher than for browser extensions. Especially with all the Electron crap these days, you're one XSS away from full-blown RCE.

Re: Browser extensions are underrated: the promise of hackable software (2019)

#150
Browser extensions, if we use the analogy as apps running within browser as an OS, are lacking simple capacities to manage the risks. Just like any app a user can install on their devices, extensions extend the attack surface. As we cannot avoid the risk by removing all of them, we can just allow users to have more control on them regardless of the browser they use. I suggested[0] using standard management APIs provided by browsers, therefore the ecosystem can use them as building blocks for FOSS and/or commercial tools. That's a very naïve idea but why not?

0. https://zaferbalkan.com/2023/10/03/browser-extension-api.htm...

Post reply on HN