vuln-scan
v0.1.4
Published
Node.js CLI to scan dependency lockfiles for vulnerabilities using OSV.dev
Downloads
520
Maintainers
Readme
vuln-scan
A Node.js CLI that scans a project’s lockfile (npm / pnpm / yarn) to find known vulnerabilities using the OSV.dev API.
Features
- Detects package manager by lockfile:
- npm:
package-lock.json - pnpm:
pnpm-lock.yaml - yarn:
yarn.lock
- npm:
- Reads exact installed versions from the lockfile
- Queries OSV (
https://api.osv.dev/v1/query) per dependency - Colored, human-readable table output (chalk + cli-table3)
- Spinner while scanning (ora)
- Optional
--jsonoutput for automation - Includes fix version when OSV provides one
Demo

Install / Run
Run with npx
npx vuln-scanRun with pnpm
pnpm dlx vuln-scanInstall globally
npm i -g vuln-scan
vuln-scanThis package also exposes vuln-scan-cli as an alias:
npx vuln-scan -- --json
npx vuln-scan-cli
vuln-scan-cli --jsonUsage
vuln-scan
vuln-scan --jsonNotes
- Requires Node.js
>= 18(uses built-infetch). - Scans both dependencies and devDependencies as recorded in the lockfile.
Development
pnpm install
node ./cli.js
node ./cli.js --jsonSecurity
See SECURITY.md for vulnerability reporting and PGP details.
