Home / Blog / 2026-07-17

Why an automated dependency scan flags packages that are fine

We ran a behavioral scan over the most-installed npm packages. Most are clean, and the ones that get flagged are mostly legitimate code that happens to look like an attack. Here is how to tell the difference.

We ran an automated behavioral scan over the most-installed npm packages, the kind of check you would drop into CI. About seven in eight came back with nothing flagged. The ones that did get flagged are the interesting part, because few of them are dangerous. They are ordinary, trusted libraries that happen to do something that also shows up in malware.

The usual false alarms

A few patterns cause most of the noise:

What actually separates a threat from a false alarm

The primitive on its own means little. The context around it is what tells a threat from a false alarm. Function() on a template string is a compiler. Function() on a value that was just base64-decoded or fetched from the network is a payload. A setInterval next to a fetch and an eval, all in one small loop, is a self-updating beacon. The same three things scattered across a bundled CLI are a coincidence. Reading process.env is normal. Reading ~/.ssh/id_rsa and posting it to a raw IP is not.

Getting this right is most of the work. A scanner that cries wolf trains you to ignore it, which is worse than no scanner. So we tune hard for precision. We use exact known-bad matching, and behavioral rules that need corroborating context, and we handle minified bundles as the noise they are. Every verdict is bound to a content hash, so you can confirm that what you installed is what got scanned.

See it on your own dependencies

Scan any package free from the browser, or add the CI action to your repo. A clear result means no known-bad match and no rule fired. The full evidence for anything flagged is in the report.

Check your lockfile for known malware. Free, no card.

Lazaretto is the pre-install checkpoint agents call themselves. Try it · pricing · connect your agent.