all 12 comments

sorted by: hot top controversial new old
[–] 33 points 7 months ago* (5 children)

You can mitigate similar attacks by editing your .npmrc

min-release-age=7 # days
ignore-scripts=true
  • source
  • hideshow 5 child comments
  • [–] 38 points 7 months ago (4 children)

    It's a good way to keep the exploit around for seven days, too, if you apply it right away.

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

    I agree, I think it would be better to use something like dependabot or renovatebot so you can know of and apply security updates right away.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 7 months ago

    How? If you got hit by this you are looking at restoring the system from a safe previous version.

    And the compromised versions get pulled, not superseeded by a new release, so once you rebuild you would go back to a safe version...

  • source
  • parent
  • [–] 19 points 7 months ago (4 children)

    I always advocate switching to pnpm where install scripts are disabled by default. It has plenty of security features to ward off most supply chain attacks.

  • source
  • hideshow 4 child comments
  • [–] 5 points 7 months ago (3 children)

    Does disabling install scripts actually do anything though? The attack would still work if put in the code itself, no? The only difference I can see is that it would run when the project is run instead of when the package is installed.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 7 points 7 months ago

    Doesn't seem to have been live for very long.

  • source
  • 5 comments in c/opensource@lemmy.ml view that post
    [–] 10 points 7 months ago (2 children)

    I was trying to figure out why people still use Axios, when the built-in fetch works just fine. Is it because people are still sending XML requests?

  • source
  • hideshow 2 child comments
  • [–] 10 points 7 months ago*

    It provides a lot of nice syntactic sugar that you would otherwise have to write a wrapper for on top of Fetch. Built in request interception, request transformation, (de)serialization, shared request config, timeout/retries management, ...

    Though this definitely comes with bloat and supply chain risks.

  • source
  • parent
  • [–] 4 points 7 months ago

    I was reading through the thread, and it looks like the package mangers have implemented an option that says "only install package versions that are X minutes/days old". The idea is NPM has had time to act before your package manager installs that new version.

  • source
  • [–] 2 points 7 months ago

    Really sophisticated attack

  • source