ignore-scripts-guard
v1.0.0
Published
A guard package that blocks installation when npm/yarn lifecycle scripts are enabled. Used to ensure repositories have scripts properly disabled.
Maintainers
Readme
The ignore-scripts Guard
A lightweight npm/yarn package that acts as a guard to ensure lifecycle scripts are properly disabled in your repository.
Why This Exists
This package is designed to intentionally fail during installation when npm/yarn lifecycle scripts are enabled. It serves as a safety mechanism for repositories that should never run dependency installation scripts for security or build consistency reasons.
🛡️ Context: The Shai-Hulud Threat
Recent real-world attacks, such as the self-propagating Shai-Hulud worm, have exploited enabled install scripts to steal credentials and exfiltrate secrets. This package helps prevent such supply-chain attacks by ensuring install scripts are disabled.
How It Works
When added as a dependency, this package will fail installation if scripts are enabled, and install silently if scripts are disabled. This ensures your repository is protected from script-based attacks.
Installation
Install as a dev dependency:
npm config set ignore-scripts true
npm install --save-dev [email protected]MIT
