Spyke
lemmy.fromshado.ws

You can mitigate similar attacks by editing your .npmrc

min-release-age=7 # days
ignore-scripts=true
36
lemmy.world

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

37
lemmy.ml

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.

8
Eskueroreply
lemmy.fromshado.ws

As long as the bot is not allowed to automatically merge minor version bumps in libraries...

11

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...

2
lemmy.ml

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.

5

On closer inspection, preventing post-install would have fixed it too: "The attack exploited a transitive dependency, [email protected], which executed a postinstall script to deploy the RAT."

4

You reached the end

Axios JavaScript library has been compromised with malware in supply chain attack | Spyke