versioned_docs_archived/version-8.x/cli/audit.md
Checks for known security issues with the installed packages.
If security issues are found, try to update your dependencies via pnpm update.
If a simple update does not fix all the issues, use overrides to force
versions that are not vulnerable. For instance, if lodash@<2.1.0 is vulnerable,
use this overrides to force lodash@^2.1.0:
{
"pnpm": {
"overrides": {
"lodash@<2.1.0": "^2.1.0"
}
}
}
Or alternatively, run pnpm audit --fix.
If you want to tolerate some vulnerabilities as they don't affect your project, you may use the pnpm.auditConfig.ignoreCves setting.
Only print advisories with severity greater than or equal to <severity>.
Add overrides to the package.json file in order to force non-vulnerable versions of the dependencies.
Output audit report in JSON format.
Only audit dev dependencies.
Only audit production dependencies.
Don't audit optionalDependencies.
If the registry responds with a non-200 status code, the process should exit with 0. So the process will fail only if the registry actually successfully responds with found vulnerabilities.