What actually runs at npm install time
npm v12 turned install scripts off by default, so you now approve them one at a time. This is what that approval queue actually looks like across the registry, measured every day.
34run an install script, of 3,639
0.93%of the sample
24score HIGH
255.5Ma week · esbuild
Sticking to popular packages does not help
Show the numbers
| Sample | Download floor | Run an install script | Share | HIGH or MEDIUM |
|---|---|---|---|---|
| Top 100 | 101.9M/week | 1 of 100 | 1.00% | 1 |
| Top 500 | 11.6M/week | 3 of 500 | 0.60% | 3 |
| Top 1,000 | 2.2M/week | 5 of 1,000 | 0.50% | 4 |
| Top 2,000 | 182.3K/week | 17 of 2,000 | 0.85% | 12 |
| Full sample | 4/week | 34 of 3,639 | 0.93% | 25 |
The approval queue
Every package in the sample that runs something, ordered by weekly downloads. None of this is an accusation: these are well-known packages fetching a prebuilt binary or building a native addon. They are simply the ones you are now asked to approve, and "what does it actually do" is a per-package question.
| Package | Downloads/wk | Script | Command | Risk | Signals |
|---|---|---|---|---|---|
| esbuild 0.28.2 | 255.5M | postinstall | node install.js | HIGH | env, exec, fs, net |
| @sentry/cli 3.8.2 | 23.6M | postinstall | node ./scripts/install.js | HIGH | env, exec, fs, net |
| workerd 1.20261110.1 | 19.0M | postinstall | node install.js | HIGH | env, exec, fs, net |
| vue-demi 0.14.10 | 8.0M | postinstall | node -e "try{require('./scripts/postinstall.js')}catch(e){}" | LOW | fs |
| bufferutil 4.2.0 | 6.8M | install | node-gyp-build | HIGH | bin, env, exec |
| mongodb-memory-server 11.3.0 | 2.1M | postinstall | node ./postinstall.js | SAFE | none |
| node 27.0.0-alpha.0.1.0 | 1.4M | preinstall | node installArchSpecificPackage | SAFE | none |
| tree-sitter-json 0.24.8 | 1.1M | install | node-gyp-build | HIGH | bin, env, exec |
| tree-sitter-cli 0.27.2 | 839.0K | install | node install.js | MEDIUM | env, fs, net |
| oracledb 26.0.0 | 806.3K | install | node package/install.js | HIGH | obf |
| @pulumi/docker-build 0.0.23 | 806.2K | install | node scripts/install-pulumi-plugin.js resource docker-build 0.0.23 | HIGH | exec |
| tree-sitter-typescript 0.23.2 | 750.2K | install | node-gyp-build | HIGH | bin, env, exec |
| stream-chat 10.0.2 | 496.2K | postinstall | node -e "require('fs').existsSync('scripts/install-husky.mjs') && import('./scripts/install-husky.mjs')" | SAFE | none |
| @azure/msal-node-extensions 5.6.2 | 391.3K | install | exit 0 | SAFE | none |
| redis-memory-server 0.17.2 | 297.2K | postinstall | node ./scripts/postinstall | HIGH | env, exec, fs, net |
| tree-sitter-css 0.25.0 | 254.7K | install | node-gyp-build | HIGH | bin, env, exec |
| react-native-enriched-markdown 1.1.1 | 214.0K | postinstall | node postinstall.mjs | HIGH | env, exec, exec-local, fs, net |
| classic-level 3.0.0 | 171.7K | install | node-gyp-build | HIGH | bin, env, exec |
| @microsoft/m365agentstoolkit-cli 1.1.19 | 158.2K | postinstall | node deletePS1.js | HIGH | exec |
| @tree-sitter-grammars/tree-sitter-markdown 0.3.2 | 148.7K | install | node-gyp-build | HIGH | bin, env, exec |
| nodent-runtime 3.2.1 | 113.4K | install | node build.js | HIGH | fs, obf |
| node-jq 6.3.1 | 102.9K | preinstall | npm run install-binary | HIGH | env, exec, net |
| @lightdash/cli 3.275.3 | 96.8K | preinstall | bash track.sh started || echo 'skipping preinstall' | HIGH | exec |
| @lightdash/cli 3.275.3 | 96.8K | postinstall | bash track.sh completed || echo 'skipping postinstall' | HIGH | exec |
| rete 2.0.6 | 94.7K | postinstall | node postinstall.js | SAFE | none |
| zenstack 2.22.3 | 65.8K | postinstall | node bin/post-install.js | LOW | env |
| tree-sitter-yaml 0.5.0 | 58.2K | install | node-gyp rebuild | HIGH | exec, gyp |
| playwright-ws-trace 1.1.2 | 22.8K | postinstall | node scripts/postinstall.js | LOW | env, fs |
| swc-plugin-import-meta-env 1.16.20 | 21.9K | preinstall | npx only-allow pnpm | HIGH | exec, net |
| bcrypto 5.5.2 | 17.3K | install | node-gyp rebuild | HIGH | exec, gyp |
| arib-b25-stream-test 0.2.9 | 16.8K | preinstall | make clean && make && mkdir bin && cp src/b25 bin/ | HIGH | exec |
| qdd-framework 2.9.11 | 15.4K | postinstall | node install.js | HIGH | env, exec, fs, net |
| @meteorjs/swc-core 1.16.2 | 8.0K | postinstall | node install.js | HIGH | env, exec, fs |
| better-auth-studio 1.1.5 | 6.3K | postinstall | node scripts/postinstall.js | SAFE | none |
| @qooxdoo/framework 7.9.3 | 4.1K | preinstall | node ./addGitHook | HIGH | env, exec, fs |
Nothing matches that filter.
What they reach for
exec means the script spawns a process, which is exactly what a
native build does.