A CLI tool that scans your package.json for known vulnerabilities using the OSV database - no API key required.
npm install -g @sabrinahaniff/npm-scannernpm-scanner scan ./package.jsonnpm-scanner scan ./package.json --severity highnpm-scanner scan ./package.json --fixnpm-scanner scan ./package.json --jsonScanning: ./package.json
Found 5 packages. Checking OSV database...
lodash@4.17.15
GHSA-29mw-wpgm-hmr9 HIGH
Prototype Pollution in lodash
https://osv.dev/vulnerability/GHSA-29mw-wpgm-hmr9
──────────────────────────────────────────────────
Summary: 3 HIGH · 14 LOW
- Scans
dependenciesanddevDependenciesonly - does not yet scanpackage-lock.jsonfor transitive dependencies - Severity data is not always available for every CVE in the OSV database
--fixrewritespackage.jsonbut does not runnpm installautomatically- Does not support monorepos with multiple
package.jsonfiles yet
All vulnerability data comes from osv.dev, Google's open source vulnerability database.