• anyhow2503@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    9 hours ago

    Npm probably has the biggest attack surface and many of the libraries hosted there are in extremely widespread use. They’ve taken some steps to mitigate these supply chain attacks, but as we’ve seen with more recent examples, it’s unrealistic to think they can be prevented completely. Most of these attacks use stolen developer credentials, which invalidates almost all potential security measures on the registry side and the best you can hope for is catching a malicious package quickly. To be clear: I think the JS ecosystem is uniquely positioned to be the prime target of supply chain attacks and while that doesn’t excuse the slow implementation of security measures from the npm team, the people arguing that other package managers and registries aren’t vulnerable to this have to be huffing fumes.

    • [object Object]@lemmy.ca
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 hours ago

      That’s fair, I won’t pretend pypi/pip and running uvx is much safer than npx.

      But why hasn’t JavaScript established a defacto stdlib to replace ask the left pads and is even type packages?

      I’ve taken a near zero dependency policy on my personal projects regardless, and now I run most code in containers to sandbox it.

      • anyhow2503@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        53 minutes ago

        But why hasn’t JavaScript established a defacto stdlib to replace ask the left pads and is even type packages?

        I’m guessing things were working out pretty alright, even with the insane amount of dependencies per project. The awareness and the increasing frequency of supply chain attacks is relatively recent for npm. But who knows, maybe the tech giants in control of the web standards are happy to keep using their own vendored registries.