Readit News logoReadit News
knlsn commented on Show HN: Tips to stay safe from NPM supply chain attacks   github.com/bodadotsh/npm-... · Posted by u/bodash
politelemon · 3 months ago
Isn't this just checking packages against known cves, which wouldn't help for undiscovered or unannounced vulnerabilities. Let me know if I've misunderstood, I'm basing off the documentation site.

Also I find the irony goes hard in their recommendation of installing another attack surface (brew) on Linux and missing the point.

knlsn · 3 months ago
I think, they have an malware detection engine of their own, so not only they help protect from known vulnerabilityes / malwares but also have thier own database

their blog: https://safedep.io/dynamic-analysis-oss-package-at-scale/

knlsn commented on Show HN: Tips to stay safe from NPM supply chain attacks   github.com/bodadotsh/npm-... · Posted by u/bodash
HoyaSaxa · 3 months ago
For most projects, overriding every single transitive dependencies to be pinned is impractical.

Instead, for those using npm, I'd highly suggest using `npm ci` both locally and of course on CI/CD. This will ensure the (transitive) dependencies pinned in the lockfile are used.

TIL on the `npm install --before="$(date -v -1d)"` trick; thanks for that! Using that to update (transitive) dependencies should be really helpful.

For those using GitHub Actions, I'd also recommend taking advantage of the new dependabot cooldown feature to reduce the likelihood of an incident. Also make sure to pin all GitHub Action dependencies to a sha and enforce that at the GitHub repo/account level.

knlsn · 3 months ago
For GitHub Actions, i found http://safedep.io/ to be helpful, not only it guard against known attacks, but also it has its own malware detection engine.
knlsn commented on Show HN: Tips to stay safe from NPM supply chain attacks   github.com/bodadotsh/npm-... · Posted by u/bodash
knlsn · 3 months ago
Good resource

u/knlsn

KarmaCake day1September 27, 2025
About
Software Engineer
View Original