Node.js Dependency Audit CLI: Fast, Zero-Dependency SCA for NPM
Audit direct and transitive dependencies in Node.js projects, detect vulnerabilities in the Google OSV database, and validate lockfile integrity—without external packages or API keys.
The Problem with Traditional SCA Tools in Node.js
Why do tools like Snyk or `npm audit` introduce friction into the DevSecOps workflow?
Traditional Tools
(Snyk / npm audit)-
Heavy Runtime & Dependency Overhead
Requires Node.js runtime and downloads hundreds of MB in `node_modules` just to audit security.
-
Mandatory Accounts & SaaS API Keys
SaaS platforms require registration, CI/CD secret token management, and uploading manifests to external servers.
-
Noisy & Imprecise Alerts
`npm audit` generates massive advisories without adaptable severity thresholds for pipelines (`--fail-on-vulns`).
-
No Cryptographic Lockfile Hash Auditing
Fails to verify if lockfile hashes have been tampered with or use weak/obsolete algorithms like SHA-1.
Kevlar-CheckDeps
(Node.js Audit)-
Zero External Dependencies (Pure Python)
Runs on standard Python 3.11+ library. No `pip install` or `npm install` required.
-
Direct Batch Queries to Google OSV DB
Sends HTTP POST batch requests (`/v1/querybatch`) to audit up to 1,000 packages without credentials or API keys.
-
Multi-Package Manager Support (npm, Yarn, pnpm)
Audits `package-lock.json`, Yarn Berry (`yarn.lock` v1-v4), and pnpm (`pnpm-lock.yaml` v5-v9) without false positives.
-
100% Local Hash & Integrity Auditing
Cross-validates package signatures against the official npm registry while keeping source code 100% private.
Quick Usage Guide & Practical Example
How to run local scans, export executable reports, and integrate Kevlar into your CI/CD pipeline.
Full Local Scan
Audit direct and transitive dependencies while querying the Google OSV DB:
$ python kevlar.py --tech npm --path ./ --all --vuls
Export HTML / SARIF
Generate interactive HTML dashboards or standard SARIF v2.1.0 reports:
$ python kevlar.py --tech npm --path ./ --all --vuls --output report.html
$ python kevlar.py --tech npm --path ./ --all --vuls --output report.sarif
CI/CD Build Breaking
Fail CI/CD pipelines automatically if severe vulnerabilities are detected:
$ python kevlar.py --tech npm --path ./ --all --vuls --fail-on-vulns "critical:1,high:2"
Quick Comparison Matrix
Compare Kevlar-CheckDeps with common alternatives in the Node.js ecosystem.
| Feature / Criterion |
Kevlar-CheckDeps
Featured
|
npm audit | Snyk CLI | OWASP Dep-Check |
|---|---|---|---|---|
| Execution Speed |
⚡
Ultra-fast
(Multi-threaded & OSV Batch)
|
Medium Bound to npm CLI | Slow SaaS Cloud Analysis | Very Slow Full NVD Download |
| External Dependencies |
Zero
(Python 3.11+ Std Lib)
|
Requires Node.js / npm | Requires Node.js / CLI Binary | Requires Java Runtime (JRE) |
| API Keys / Accounts |
Not Required
(Public Google OSV)
|
Not Required |
Mandatory
(Account & SaaS Token)
|
Optional (NVD API Key) |
| Code & Manifest Privacy |
100% Local Execution
|
Local / NPM Registries | Manifests Sent to SaaS | 100% Local Execution |
| Lockfile Checksum Audit |
Yes
(SHA-1 & Mismatch Audit)
|
No | No | No |
| Cost & License |
Free & Open Source
(Apache 2.0 License)
|
Free (Bundled in npm) | Freemium / Commercial | Free & Open Source (Apache 2.0) |
Frequently Asked Questions (FAQ)
Quick answers to common questions about Node.js dependency auditing.