Vulnerability scanning looks for known flaws in code that was written in good faith, such as a bug that lets an attacker bypass a check. Malware screening looks for code written to do harm, such as a stealer hidden in an install script. A package can pass one and fail the other, so you need both.
What each check asks
Vulnerability scanning asks: does this package and version appear in a database of known flaws? The answer comes from published advisories.
Malware screening asks: does this package contain behavior that looks hostile? There may be no advisory at all. The detection comes from analysis of the package contents.
Where each one shows up in practice
Vulnerability results usually come from a scanner that matches your dependencies against advisory databases. Malware results come from a different source, such as registry takedown notices, analysis of install scripts and network calls, and signals about maintainers. Tools often report the two in separate places, so check which one a tool actually covers before you rely on it.
Why a package can pass one and fail the other
A brand new malicious package has no CVE, so a vulnerability scan shows nothing. A well known library can have a serious CVE and no malicious behavior at all. A package that was clean last week can be taken over and a malicious version published. Each check answers a different question.
Limits of each
Vulnerability scanning cannot see unreported flaws or intent. Malware screening cannot prove the absence of every hostile behavior, and it tends to be a snapshot of a specific version. Both depend on timing: a result is a statement about a version at a moment.
How to use both in practice
- Before adding a package, check it against both a vulnerability database and a source of malicious package reports.
- Pin exact versions so a later malicious release does not reach you automatically.
- Consider a short waiting period before adopting brand new releases.
- Review install scripts for anything that fetches or runs code.
- Re-check on a schedule.
What a clean pair of results still misses
Neither check tells you whether you configured the package safely or whether your own code misuses it. For the first, use configuration review. For the second, use code analysis.
Where Safeguard fits
Safeguard's dependency scanning and policies help enforce the vulnerability check in pull requests, and the free scan at gold.safeguard.sh/scan covers the known vulnerability side for a manifest. Safeguard's Package Firewall may block malicious, typosquatted and dependency-confusion packages. For how a clean result can mislead, see /resources/blog/a-clean-scan-does-not-mean-your-software-is-safe.
Quick check
Does the free scan check for malware?
The scan page says it shows which packages carry known vulnerabilities. It does not describe malware checks.
Sources
Last reviewed: 19 October 2026.