Deploy
Check every package your AI added
AI tools sometimes suggest packages that don't exist or are typos. Attackers register those names. How to verify packages, lock versions and audit.
Why it matters
Models sometimes suggest packages that don't exist, or near-miss spellings of real ones. Attackers register those names with malicious install scripts. This is called slopsquatting.
How to fix it
- For each new dependency, look it up on npmjs.com or pypi.org: exact name, linked source repository, recent releases, reasonable downloads.
- Remove packages you don't need; every dependency is code you trust.
- Commit your lockfile and install with
npm ci(or your package manager's frozen-lockfile option) in CI. - Run
npm auditor a similar tool and fix high-severity issues.
npm view some-package name repository.url time.modified
npm ci
npm audit --omit=devHow to verify
- Every dependency in package.json is one you recognise and checked.
- CI installs from the lockfile.
Questions
- Does npm audit catch slopsquatting?
- Not reliably. It reports known vulnerabilities; a new malicious package may have none yet. Check names by hand.
Related checks
- Turn on secret scanning
- Don't leave debug, admin or test routes public
- Treat user and AI input as untrusted
Tick it off in the full checklist