9 comments

  • nezza-_-14 minutes ago
    WebUSB is so great.<p>I can ship a cross-platform application that accesses a hardware device without having to deal with all the platform specifics, and with decent sandboxing of my driver.<p>I think one way to make it more &quot;secure&quot; against unwitting users would be to only support WebUSB for devices that have a WebUSB descriptor - would allow &quot;origin&quot; checking.
  • chillfox5 minutes ago
    Well, this seems like a terrible idea. I really don&#x27;t want websites to be able to access hardware. I am already uncomfortable with the webcam access.
  • sva_1 hour ago
    I recently flashed GrapheneOS on a Pixel for a friend. I was very surprised that you can do this entire process from the browser using WebUSB - the only downside being that it required me to launch Chromium.
    • infogulch53 minutes ago
      You can flash GrapheneOS on a Pixel <i>from another pixel</i>, no pc required at all. I&#x27;ve done it several times, this is what sold me on the utility of WebUSB. You can use GOS&#x27; own distribution of chromium, Vanadium, if you have a GOS device and you want to avoid Chrome.
    • lxgr25 minutes ago
      Web USB and Web Bluetooth are amazing. I&#x27;ve used the former for the excellent Web MiniDisc [1], and the latter to flash custom firmware [2] on cheap Xiaomi Bluetooth LE thermometer&#x2F;hygrometer devices that Home Assistant can pick up.<p>Truly opening new possibilities, since I wouldn&#x27;t have been comfortable running some sketchy script or local binary.<p>[1] <a href="https:&#x2F;&#x2F;web.minidisc.wiki&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.minidisc.wiki&#x2F;</a> [2] <a href="https:&#x2F;&#x2F;github.com&#x2F;pvvx&#x2F;ATC_MiThermometer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pvvx&#x2F;ATC_MiThermometer</a>
  • Orygin1 hour ago
    No thanks. I&#x27;ll accept it in my browser when they fix the security implications this raises, and when the Spec is no longer in draft.
    • Retr0id1 hour ago
      The security implications of <i>not</i> having WebUSB are having to install untrustworthy native drivers every time you want to interface with a USB device.
      • 1313ed011 hour ago
        Sounds like something that could have a standalone usb-driver-container or special chromium fork for the 0.00001% of users that need it instead of bloating every browser with yet another niche API and the inevitable security holes it will bring.
      • fhn11 minutes ago
        why would you be using untrustworthy hardware to begin with?
      • rafram1 hour ago
        On macOS, I think I&#x27;ve installed device drivers exactly once in the last decade, and they were for a weird printer.
        • kristofferR35 minutes ago
          Most device drivers nowadays aint necessary to solely get the device working, but to get it working well. All keyboards will work out of the box without any drivers&#x2F;webusb-pages, but good luck configuring rapid triggers on your Wooting keyboard or a DPI-switching macro on your Logitech mouse without it.
      • skydhash1 hour ago
        That sounds like a Windows problem.
        • Retr0id1 hour ago
          I&#x27;m not familiar with the Windows platform but although you can have <i>userspace</i> USB drivers on linux, you still need to be able to run code that can talk to the sysfs interface.
        • monegator1 hour ago
          Not really, as long as the firmware developers used OS 2.0 descriptors<p>(For the rare occurences that our customer is using 7 or earlier, we tell them to use zadig and be done with it.)
        • Lerc1 hour ago
          The Linux problem is more<p>Hope every time you want to interface with a USB device.
      • monegator1 hour ago
        you do know microsoft OS 2.0 descriptors are a thing, right? or that you can force the unknown device to use WinUSB<p>but really most devices you want to interface to via webusb are CDC and DFU so.. problem solved?
        • Retr0id1 hour ago
          I&#x27;m unfamiliar with the Windows platform but that sounds like something that still requires executing code locally.
          • monegator1 hour ago
            Not sure what you mean.<p>Anyway OS 2.0 descriptors are a custom USB descriptor that basically tells the device to use WinUSB as the driver. The burden then is in the application that will have to implement the read&#x2F;writes to the endpoints instead of using higher level functions provided by the custom driver.<p>If you ever developed software with libUSB, using WinUSB on the windows side makes things super easy for cross platform development, and you don&#x27;t have to go through all the pain to have a signed driver. Win-win in my book.
        • pjc501 hour ago
          .. or HID ( <a href="https:&#x2F;&#x2F;usevia.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;usevia.app&#x2F;</a> , for programmable keyboards)
          • monegator1 hour ago
            yes, you can always use some nasty protocol over HID for your devices. But really most of what i do is one or multiple bulk endpoints so i can achieve full bandwidth (downloading firmware, streaming data, ...) OS2.0 made it possible to do it without having to write and sign a driver
      • PunchyHamster1 hour ago
        You can have userspace drivers for usb devices in Linux
        • scottbez146 minutes ago
          How does the security of userspace drivers compare to having drivers within a sandboxed web environment with access to only the devices you’ve explicitly allowlisted?
    • zb31 hour ago
      What are the security implications this raises that downloading native programs (needed for example to flash my smartphone) doesn&#x27;t raise?
      • troupo4 minutes ago
        &gt; What are the security implications this raises that downloading native programs (needed for example to flash my smartphone) doesn&#x27;t raise?<p>1. Permission popups fatigue<p>2. Usually users select the apps they install, most sites are ephemeral. And yes, even with apps, especially on Android, people click through permission dialogs without looking because they are often too broad and confusing. With expected results such as exfiltrating user data.
      • barnabee27 minutes ago
        None. People will follow any instruction presented to them when they think it will get them something they want. Mozilla’s stance here is infuriating.
    • gear54rus1 hour ago
      And I&#x27;ll just fire up a chrome instance which I specifically keep for when my daily driver firefox decides to spazz out and not implement basics in 2026 :&#x27;(
      • yjftsjthsd-h13 minutes ago
        Are you calling WebUSB a basic feature? Because I&#x27;m willing to discuss whether we should have it, but that seems like an exaggeration.
      • lpcvoid1 hour ago
        How do you make sure that technically illiterate people don&#x27;t just click away the requestDevice() popup? IMHO a browser offering device level USB access is a security nightmare and there is no way this can ever be made safe and convenient at the same time.
        • limagnolia1 hour ago
          Isn&#x27;t that the same excuse Gooogle is using to lrevent folks from installing what they want on Android phones?
        • gear54rus1 hour ago
          You simply don&#x27;t. This quest of saving idiots from themselves is not gaining anyone anything and meanwhile other people get more and more useless restrictions.
          • Orygin26 minutes ago
            Or you can just not give a loaded shotgun to every browser user on the off chance they need to interact with 1 (one) usb device per year.
        • exe341 hour ago
          You can ask them to type one of the following sentences:<p>&quot;I know what I&#x27;m doing, and giving a random website access to my USB host is the right thing to do.&quot;<p>&quot;I&#x27;m an idiot.&quot;
        • zb31 hour ago
          They can click everything away, so maybe educate them or buy an ios device for your relatives instead of breaking computing for everyone else.
          • Orygin25 minutes ago
            &gt; breaking computing for everyone else<p>How is not implementing a Draft spec, which may compromise security badly, breaking computing?<p>Overreacting much?
            • zb33 minutes ago
              This is not just an isolated incident, it&#x27;s the whole trend of limiting capabilities in the name of security and that&#x27;s what I was referring to.<p>However in this particular case, even the security argument doesn&#x27;t hold, either I:<p>a) know that I want to use USB - in that case I&#x27;ll switch browsers or download a native binary (even more unsafe), it&#x27;s not that I&#x27;d decide that I no longer want to flash my smartphone<p>b) I don&#x27;t understand what&#x27;s happening but I follow arbitrary instructions anyway - WebUSB changes nothing.
          • lpcvoid1 hour ago
            Fair, but remember that we are the &lt;~1% of people who even know what webusb is. I&#x27;m not sure I share your view on this.<p>Maybe an about:config switch to enable it would be enough to stop casuals from pwning their peripherals.
            • barnabee29 minutes ago
              I’d be ok with an about:config switch, but given that many people will install anything, paste arbitrary text into terminals, and share their password&#x2F;pin code with complete strangers for almost no reason, I think we need to stop making our tools less powerful in pursuit of an impossible goal.
          • troupo3 minutes ago
            &gt; They can click everything away, so maybe<p>So maybe don&#x27;t populate the browser with dozens of features requiring permission popups?
  • afavour1 hour ago
    Looks to be a great proof of concept. No, running a standalone executable alongside the browser is not the way you&#x27;d want to do WebUSB. But it&#x27;s great to see someone working on it.
    • Orygin24 minutes ago
      Running directly in the browser is also not how I&#x27;d want to do USB.
      • afavour13 minutes ago
        When the alternative is downloading arbitrary executables I find the browser sandbox to be a reassurance.
  • Zopieux17 minutes ago
    And Web Serial reached mainline Firefox last week.<p>I hope Mozilla can eventually stop playing their silly role in the security theater of “but what if our users are dumb” and actually deliver those &quot;power-user&quot; features that would allow me to uninstall Chrome for good. Oh, and also, --app= flag please.
    • troupo7 minutes ago
      &gt; their silly role in the security theater of “but what if our users are dumb”<p>It&#x27;s not security theater. If you go to Chromium settings -&gt; Site settings -&gt; permissions, and expand &quot;additional permissions&quot;, you will see a total of <i>26 different permissions</i>, each gated by the same generic &quot;you want to use this&quot; popup.<p>Permission popup fatigue is quite real, and not a security theater. And that&#x27;s on top of the usual questions of implementation complexity etc.
  • npodbielski6 minutes ago
    Interesting. So I could use that to install Graphene OS?
  • shevy-java34 minutes ago
    Can&#x27;t Mozilla hand over Firefox to another team?
  • dreknows33 minutes ago
    [dead]