Documentation Index
Fetch the complete documentation index at: https://mintlify.com/oven-sh/bun/llms.txt
Use this file to discover all available pages before exploring further.
bun audit checks your installed packages against the npm security advisory database and reports any known vulnerabilities.
Run it in a project that has a bun.lock file:
Reading the output
If no vulnerabilities are found:Exit code
bun audit exits with code 0 when no vulnerabilities are found, and 1 when any vulnerabilities are reported. This applies even when --json is used, making it easy to use in CI scripts.
Filtering by severity
Use--audit-level to only show vulnerabilities at or above a given severity:
low, moderate, high, critical.
Production-only audit
Use--prod to audit only production dependencies, excluding devDependencies:
Ignoring specific CVEs
Use--ignore to suppress specific CVEs. The flag can be repeated:
JSON output
Use--json to receive the raw JSON response from the registry instead of the formatted report: