Bulk approval allows every pending dependency to run installation scripts
Source references: 3The documentation offers `pnpm approve-builds --all`. This bypasses package-by-package review, while dependency lifecycle scripts can execute arbitrary code as the user or CI identity running pnpm.
A malicious or compromised dependency could read workspace files and CI environment variables, alter build outputs, or use credentials available to the job.
This is an actionable command, not merely a warning. pnpm normally blocks unreviewed dependency build scripts, while `pnpm approve-builds --all` approves every pending one at once. If an agent runs it without package-by-package review, approved install scripts execute with the current user or CI identity. A user can require an explicit script inventory and individual approvals, prohibit `--all`, and install in a low-privilege environment without credentials.
### Approving builds```bashpnpm approve-builds # interactive promptpnpm approve-builds --all # approve all pendingpnpm approve-builds esbuild fsevents !core-js # ! = denypnpm add --allow-build=esbuild my-bundler # approve while addingpnpm add -g --allow-build=esbuild esbuild # global (replaces approve-builds -g)```Show 2 other places
By default pnpm does **not** run dependency lifecycle scripts (`preinstall`/`install`/`postinstall`). Packages must be explicitly approved. Approval lives in one `allowBuilds` map in `pnpm-workspace.yaml`.```bashpnpm approve-builds # interactive promptpnpm approve-builds --all # approve all pendingpnpm approve-builds esbuild fsevents !core-js # ! = denypnpm add --allow-build=esbuild my-bundler # approve while addingpnpm add -g --allow-build=esbuild esbuild # global (replaces approve-builds -g)```