Vet each package before an npm supply chain attack reaches your project
An npm supply chain attack can arrive through a package your project installs. Check the package's identity even if an AI suggested it or its name looks familiar.
npm install --save-dev @sitecmd/cli
npx sitecmd audit .
The CLI runs on your computer or in your CI, and your code stays there.
What it finds on a demo project
The audit reports package names one typo away from a popular package, a missing lockfile, lockfile entries with missing or SHA-1 integrity, and no release-age delay for new versions.
SiteCMD CLI 2.0.0
Demo project: Dependencies and lockfiles
npx sitecmd audit .
SiteCMD Code Scan - .
Checked: November 9, 2026
Framework: Express
Issues: 6 total | critical 0 | high 1 | medium 4 | low 1
High (1)
- [Dependencies · supply-chain] Declared dependency resembles a popular package name - package.json:12
Medium (4)
- [Dependencies · supply-chain] Lockfile has registry dependencies with missing or weak integrity metadata - package-lock.json
- [Dependencies · supply-chain] Import is not matched to a declared or recognized local dependency - src/index.js:2
- [Dependencies · supply-chain] Undeclared import resembles a popular package name - src/index.js:2
- [Dependencies · supply-chain] Declared npm dependencies have no recognized lockfile in scope - tools/report/package.json
Low (1)
- [Dependencies · supply-chain] No detected project-level dependency cooldown - package.json:1
Your code passes? Now watch your site.
Check AI hallucinated packages before installing them
Models that generate code can suggest packages that don't exist. Follow the project's official installation instructions and confirm the package's identity. Don't install a near match just to clear an import error. Package hallucination research documents the risk.
Understand slopsquatting before trusting a package name
Slopsquatting means registering a malicious package under a name an AI invented. Finding the name in a registry doesn't prove it belongs to the project you want. This package hallucination study describes the risk.
Set an npm minimum release age for new resolutions
npm's
min-release-agefilters versions by the number of days since publication. It makes newly published versions wait before they can be selected. Age alone doesn't make a package trustworthy.Read npm's configuration reference for the installed manager's setting and exceptions.
Frequently asked questions
Does lockfile integrity prevent an npm supply chain attack?
An integrity hash records the package contents you expect. It can't tell whether those contents include malicious code. Review the package's identity and changes as well as the recorded download.
Review the workflow that installs your packages
Website security
Catch leaked API keys and exposed files before someone uses them against you.
GitHub Actions security
Pin actions and keep untrusted pull request input away from your secrets.