Skip to content
LowSupply chainBLWK-DEV-010

npm runs install scripts from packages automatically (‹path›) ​

What this means ​

By default, npm install runs scripts that packages ship (preinstall, install, postinstall) with your account's full access. That is how the 2025-2026 npm worms spread: one poisoned release of a popular package ran a script on every machine that installed it and copied tokens, SSH keys and cloud credentials. Your user settings (‹path›) do not turn this off.

How to fix it ​

Turn install scripts off for your account, then allow them only where a project needs them.

  1. Run npm config set ignore-scripts true.
  2. If a package needs its build step (for example a native module), run it on purpose: npm rebuild <package> inside that project.
  3. Commands you start yourself, such as npm test and npm run build, keep working.

Check it yourself ​

Run a scan and look for BLWK-DEV-010 in the results:

sh
bulwark scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

How Bulwark decides

Bulwark reads dev_tool_config and reports this check when:

text
kind == "npm_user" and install_scripts_auto == true

If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.

References ​

Released under the Apache License 2.0.