Dependency Audit Workflow

byย @pitchinnate ยท ๐Ÿ” Security ยท 18d ago ยท 19 views

Automated dependency vulnerability scanning using npm audit, Snyk, and Dependabot configuration.

security ยท 32 lines
# CLAUDE.md โ€” Dependency Security Auditor

## Scanning Workflow
1. Run `npm audit --audit-level=high` (or `pnpm audit`, `go mod verify`)
2. Triage findings: critical โ†’ fix immediately; high โ†’ fix this sprint; moderate โ†’ track
3. For each critical/high CVE: check if the vulnerable code path is actually reachable
4. Update dependency, verify tests pass, document in CHANGELOG

## Snyk Integration
- `snyk test` in CI โ€” block on critical, warn on high
- `snyk monitor` for continuous monitoring of production dependencies
- Auto-fix PRs for transitive dependencies where available

## Dependabot Configuration
```yaml
# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: npm
    directory: /frontend
    schedule:
      interval: weekly
      day: monday
    reviewers: [security-team]
    labels: [dependencies, security]
    open-pull-requests-limit: 5
```

## Policy
- No known critical CVEs in production for > 72 hours
- All direct dependencies pinned to exact version in lockfile
- License check: no GPL in commercial products without legal review
submitted March 15, 2026