audit Verified current stable Not installed? Package Management

Audit / Scan Project Dependencies

Scan Project Dependencies

Scans all project dependencies for vulnerabilities and security issues.

$
Terminal
pnpm audit

When To Use

Before deploying to production to ensure all dependencies are secure.

Pro Tip

Consider using `--json` to generate parsable output for integrations with CI/CD tools.

Anatomy of Output

Understanding the result

+ example-package: 3 vulnerabilities Package Vulnerabilities

Indicates security issues detected.

└── moderate severity - URL: <link-to-advisory> Severity Description

Details of the severity and link for more information.

found 5 vulnerabilities, 0 low severity Summary

Total vulnerabilities categorized by severity.

Troubleshooting

Common pitfalls

ERR_PNPM_AUDIT_NOT_SUPPORTED: Audit not supported for this package

Solution: Ensure the package is compatible with the audit process.

ERR_PNPM_AUDIT_FAILED: Audit process failed

Solution: Re-run the command to see if the issue recurs.

ERR_PNPM_NETWORK_ERROR: Encountered a network error during audit

Solution: Check your internet connection and retry the audit.

Command Breakdown

What each part is doing

pnpm
Base Command
The executable that performs this operation. Here it runs Audit before the shell applies any redirect operators.

Alternative Approaches

Comparable commands in other tools

Alternative package management tools for the same job.