npm-audit
scans for security vulnerabilities
TLDR
Audit dependencies
$ npm audit
Fix vulnerabilities$ npm audit fix
Force fix (breaking changes)$ npm audit fix --force
Output as JSON$ npm audit --json
Audit production only$ npm audit --production
Set audit level$ npm audit --audit-level=[high]
SYNOPSIS
npm audit [options]
DESCRIPTION
npm audit scans for security vulnerabilities. Checks packages against known issues.
The command reports security advisories. Can automatically fix some issues.
PARAMETERS
fix
Automatically fix issues.--force
Force updates (may break).--json
JSON output format.--production
Production deps only.--audit-level LEVEL
Minimum severity.--help
Display help information.
CAVEATS
Requires network. May suggest breaking updates. Review before force fixing.
HISTORY
npm audit was added to npm 6 to provide automated security vulnerability scanning.
