snippetbashTip
pnpm audit — Scan project dependencies. Check for known security issues with the installed packages. More informa
Viewed 0 times
commandpnpm auditdependenciesclicheckscanforproject
Problem
How to use the
pnpm audit command: Scan project dependencies. Check for known security issues with the installed packages. More information: <https://pnpm.io/cli/audit>.Solution
pnpm audit — Scan project dependencies. Check for known security issues with the installed packages. More information: <https://pnpm.io/cli/audit>.Identify vulnerabilities in the project:
pnpm auditAutomatically fix vulnerabilities:
pnpm audit fixGenerate a security report in JSON format:
pnpm audit --json > {{path/to/audit-report.json}}Audit only dev dependencies:
pnpm audit {{[-D|--dev]}}Audit only production dependencies:
pnpm audit {{[-P|--prod]}}Exclude optional dependencies from the audit:
pnpm audit --no-optionalIgnore registry errors during the audit process:
pnpm audit --ignore-registry-errorsFilter advisories by severity (low, moderate, high, critical):
pnpm audit --audit-level {{severity}}Code Snippets
Identify vulnerabilities in the project
pnpm auditAutomatically fix vulnerabilities
pnpm audit fixGenerate a security report in JSON format
pnpm audit --json > {{path/to/audit-report.json}}Audit only dev dependencies
pnpm audit {{[-D|--dev]}}Audit only production dependencies
pnpm audit {{[-P|--prod]}}Context
tldr-pages: common/pnpm audit
Revisions (0)
No revisions yet.