commands.sh

npm audit

all

Scan project dependencies for known security vulnerabilities.

More info →

Options (1)

-f, --forceboolean

Force an automatic fix to dependencies with vulnerabilities

Example: npm audit fix {{[-f|--force]}}

Examples (7)

Scan the project's dependencies for known vulnerabilities

Automatically fix vulnerabilities in the project's dependencies

Force an automatic fix to dependencies with vulnerabilities

npm audit fix [-f|--force]

Update the lock file without modifying the `node_modules` directory

npm audit fix --package-lock-only

Perform a dry run. Simulate the fix process without making any changes

npm audit fix --dry-run

Output audit results in JSON format

npm audit --json

Configure the audit to only fail on vulnerabilities above a specified severity

npm audit --audit-level info|low|moderate|high|critical
made by @shridhargupta | data from tldr-pages