you are viewing a single comment's thread
view the rest of the comments
[–] 50 points 6 months ago (35 children)

Don't. Use. Npm.

That applies to pip and crate and all the other shitty lang package managers that totally fail at security

  • source
  • hideshow 35 child comments
  • [–] 39 points 6 months ago (6 children)
  • [–] 8 points 6 months ago (4 children)

    A package manager that uses cryptographic signatures. Apt had this since 2005 iirc. Use apt.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 6 months ago (2 children)

    Apt is great, but it does not work with every language. As an example, you cannot use apt with maven (java) AFAIK.

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (-1 replies)
  • [–] 3 points 6 months ago (2 children)

    so many workplaces I have been at used npm.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 6 months ago

    We just recently switched from npm to pnpm, due to all the supply chain attacks. I did the PR for it, even.

    Our release schedule is like a year though so we don't really have to worry much about releasing compromised dependencies. But still, better to be on the safer side.

  • source
  • parent
  • [–] 6 points 6 months ago (10 children)

    Honestly just fine use computers at all, completely eliminate the remote attack vector. And only drink rain water since city water can be compromised.

    Or, recognize this is a normal part of using software and have more than 1 thing between you and a breach

  • source
  • parent
  • hideshow 10 child comments
  • [–] 29 points 6 months ago (1 child)

    The rules of cybersecurity:

    1. Under no circumstances should you own a computer.

    2. If you absolutely must own a computer, under no circumstances should you connect it to the internet.

    3. If you absolutely must connect it to the internet, it’s too late and they already have you

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 6 months ago

    I know this is a joke but im old enough we used to install the os and had it on the network and eventually update it but then it got to the point were like being connected to the internet for like a minute and the machines were compromised. Thats when we got off our duffs and started making custom installs that had updates and configurations and software pre installed before we even connected it to the net.

  • source
  • parent
  • [–] 3 points 6 months ago (5 children)
  • [–] 6 points 6 months ago* (4 children)

    And how would apt help in this particular case? A supply chain attack can happen with any particular package manager. In this case, the compromised package was detected and mitigated within 93 minutes, affecting a total of ~330 users. Which is a lot better than how a lot of distros handled the xz breach last year.

    All reasonably secure package managers (and https) operate on a chain of trust. There is little that can be done if that chain of trust is broken.

    Based on this the cause was a malicious VSCode extension that stole credentials that were later used to trigger a deployment CI/CD pipeline. If there's anything to learn from this, it's probably to not use VSCode.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 6 months ago (3 children)

    With cryptography. X.509 is trash. They should pin the public key.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 6 months ago (2 children)
    1. If your assumption is that X509 is trash, does that mean you hold the same amount of distrust to TLS?
    2. How do you propose the scaling of key management? Do you have a reasonable alternative to users blindly trusting every single key they come across?
    3. Back to my original question: what prevents a VSCode extension from stealing a private signing key (as opposed to an API key) and causing the same issues described here?
  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 6 months ago (3 children)

    What about using pip just to download basic common libraries for offline use?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 6 months ago (2 children)
  • [–] 1 point 6 months ago (6 children)

    Unfortunately I have to use node for home project (Jellyfin tizen)

    I was wondering: would it be possible to run node in a sandbox to lower the scope of the attack? (i.e. not compromise my home computer) Or is maybe a full VM a better solution?

  • source
  • parent
  • hideshow 6 child comments