dr-dep-audit
v0.0.3
Published
Audit npm dependencies for outdated packages and vulnerabilities with a fast, colorized CLI. Supports config files, GitHub Actions annotations, and CI/CD integration with automatic failure on high/critical issues.
Maintainers
Readme
dr-dep-audit
dr-dep-audit
dr-dep-audit is a fast CLI to check Node.js projects for:
- Outdated dependencies
- Security vulnerabilities via
npm audit
Colorized tables, config file support, GitHub Actions annotations, and non-zero exit on high/critical vulns.
🚀 Install / Run
Global install:
npm install -g dr-dep-audit
dr-dep-audit --help
---
## 📦 Usage
### CLI
```bash
npx dr-dep-audit --severity moderate --exclude lodash,express --ghaOptions:
| Flag | Description |
|--------------------|-------------|
| --path <dir> | Project path (default: cwd) |
| --severity <lvl> | Minimum severity to report (low, moderate, high, critical) |
| --exclude <list> | Comma-separated package names to ignore |
| --gha | Emit GitHub Actions annotations |
Config file
Place one of these in your project root:
dep-audit.json.dep-auditrcdep-audit.yml/dep-audit.yaml
Example (dep-audit.yml):
severity: moderate
exclude:
- lodash
- express🛠 Example Output
Vulnerabilities:
bad-pkg HIGH Prototype Pollution
meh-pkg MODERATE Some advisory
Dependency status badges:
Dependencies: https://img.shields.io/badge/dependencies-out_of_date-yellow
Vulnerabilities: https://img.shields.io/badge/vulnerabilities-high-red📌 GitHub Actions Example
name: dep-audit
on: [push, pull_request]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
- run: dep-audit --severity moderate --gha⚙️ Exit Codes
- 0 → OK (no high/critical vulnerabilities found)
- 1 → At least one high/critical vulnerability detected
📄 License
MIT © cavani21

