Safeguard
AI Security•

Do you scan open source packages for malware? How to answer customers

Vulnerability scanning and malicious package detection are different controls. Learn how to answer a customer without mixing them up or overclaiming.

Safeguard Security Team
3 min read

Separate the two. Say whether you check dependencies for known vulnerabilities, and say separately what you do about malicious or tampered packages: allowlists, lockfiles, review of new additions and delayed adoption of brand new versions. Do not claim malware detection you do not run.

Two different problems

A known vulnerability is a flaw in legitimate code that has been catalogued, usually with an identifier. A malicious package is code published to cause harm, often through a lookalike name, a hijacked maintainer account or a compromised build. Vulnerability scanners match against advisories, so a brand new malicious release may appear in no database yet.

Customers sometimes lump the two together. Your answer should not.

What you can honestly describe

ControlWhat it addresses
Lockfiles and exact versionsUnexpected version changes
Clean installs in CIDrift between lock and manifest
Review of new dependenciesLookalike and unnecessary packages
Provenance checks where offeredUnknown build origin
Private mirror or allowlistDirect pulls from public registries
Waiting period for fresh releasesExposure to very new malicious versions

npm documents that npm ci requires an existing lock file and exits with an error if the lock does not match the manifest, which makes it suitable for automated builds. npm also states that provenance gives a verifiable link to source and build instructions but does not guarantee a package is free of malicious code.

What not to say

  • "We detect all malicious packages." Nobody can promise that.
  • "Provenance means the package is safe." The registry documentation says otherwise.
  • "We scan for malware" if you just match advisories.

Reply template

We distinguish known vulnerabilities from malicious packages. For vulnerabilities, we match our component inventory against advisory data. For malicious or tampered packages, we pin versions with lockfiles, install from the lock in CI, review new dependencies, and check provenance where the registry provides it. We do not claim to detect every novel malicious release.

That last sentence is the one customers remember.

Related reading: malicious package detection tools and abandoned package takeover risks.

A worked example

Suppose a customer asks, "Do you scan for malicious packages?" and you run an advisory scanner plus lockfile installs. The accurate reply separates the layers. The scanner matches your inventory to published advisories, so it will flag a malicious release once an advisory exists for it. The window before that advisory is what lockfiles, clean installs and delayed adoption of brand new versions are meant to narrow.

If a customer pushes for more, offer to walk through one real example: a new dependency request, the review notes, the lockfile change and the build log. A single concrete trace answers the question better than a longer paragraph of claims.

Quick check

Does a lockfile stop a malicious package?

It stops silent version changes. It does not make the version you locked trustworthy.

Is signed provenance enough?

It tells you where and how a package was built. You still decide whether to trust that source.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.