@reiddragon This is true for you and me, but not the average user. They don't verify or build their tools from scratch, and IMO, "opening random website with WebUSB/WebBluetooth" is a major security win over "executing random code".
I maintain a popular WebBluetooth application, which is a reverse-engineered client for a proprietary health gadget. It replaces a .exe from a random vendor website (served via HTTP...). A web app is much nicer than asking users to download and run arbitrary code.
@reiddragon I also use the ESPHome web UI to flash stuff (built from source in a sandbox, served from my local server). Personally, I much prefer this, both in terms of security and convenience, over having to run a native app on my local device.
Even if I build it myself, I can't actually read all of the ESPHome source code and its dependencies before building and executing it.
@reiddragon This kind of user would blindly download and install a random binary, or Android app, or whatever, if that's what it takes to get their gadget running (speaking from experience here...). One of these alternatives is much safer than the others.
And even for experienced users like myself, I would much rather run an open source utility in a sandbox vs outside a sandbox. I can't possibly read and verify every single line of code in it, and escaping the Chromium sandbox is expensive.
@reiddragon @leoluk i think you think the web is way less secure than it actually is
the web is what a lot of us use to do banking, interact with government services, etc, and i haven't heard of many serious actually vulnerabilities recently, and like im talking about actual instances of exploits, don't just wave around the term "XSS" like it's some magical bullet that every website is vulnerable to
@reiddragon @leoluk > and once you know what code you're running, it won't change
you are aware that native apps can update themselves silently, yes?
@reiddragon @leoluk which, uh, everyone (+/- 30%) does, and like, it kinda is inherent. and also, you're kidding yourself, no vendor of a consumer product is releasing anything except a windows app, maybe a mac app, both of which will install startup daemons which you can't easily disable. maybe you'll get a CLI tool from some nerds, which you'll probably just download the release binary which you have no way to validate is actually the source on git because nobody wants to sit in IDA/Ghidra and pull it apart
this is definitely a more secure ecosystem than shipping a HTML file that is plain text and much more easily reversible, and only has access to the one USB device you chose and completely disappears as soon as you close the tab
@reiddragon @tay I don't think anyone is saying that it's 100% safe (nothing is, obviously), but that it's *safer* to run applications in the browser sandbox, especially considering most real world use cases. IMO, that makes WebUSB a good thing.
Browser sandboxes are very robust. Exploits are rare and expensive (750k+ Google bug bounty, 2-3M on the black market) and using them risks burning them. It's an imperfect, but very effective security boundary.
@reiddragon @leoluk @tay Caveat: It's perfectly possible to do JIT safely & properly. (Some things cannot be JIT'd in a general manner safely, of course.)
It is a design choice to do it wrong (prioritizing speed over correctness) like is current common practice.
@cato
Also: WebMIDI...
(Yes Novation, I look at you with your Components management tool for your synths!)
@momo @cato Hab ich bisher nie erfolgreich benutzen können. Brauche ich allerdings nicht zum flashen, sondern nur Noten in Websynths kippen o.ä. Thomanns stompen-dings funktioniert bei mir auch nicht.
Das einzige, was (leider auch nur) in chromiumbased Browsern zuverlässig funktioniert, sind ZSA's Tastaturflashtool und deren 10-Fingertrainingsseite. Für ersteres gibt's auch ein offline-Tool (und prinzipiell ja QMK), für zweiteres monkeytype.