logoalt Hacker News

silverwindyesterday at 2:20 PM1 replyview on HN

> The culture with using version ranges for dependency resolution

Yep, auto-updating dependencies are the main culprit why malware can spread so fast. I strongly recommend the use `save-exact` in npm and only update your dependencies when you actually need to.


Replies

tedivmyesterday at 3:42 PM

This advice leaves you vulnerable to log4j style vulnerabilities that get discovered though.

The answer is a balance. Use Dependabot to keep dependencies up to date, but configure a dependency cooldown so you don't end up installing anything too new. A seven day cooldown would keep you from being vulnerable to these types of attacks.

show 1 reply