Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
allow-scripts
Advanced tools
Execute allowed npm install
lifecycle scripts.
package.json
: "allowScripts": { "packageName": "1.x.x - 2.x.x" }
npm install --ignore-scripts
or yarn install --ignore-scripts
npx allow-scripts
Only the explicitly allowed [pre|post]install
scripts will be executed.
$ npx allow-scripts [--dry-run]
Running the command will scan the list of installed dependencies (using an existing package-lock.json
or npm-shrinkwrap.json
or by creating one on the fly). It will then execute the scripts for allowed dependencies that have them in the following order:
preinstall
in the main packagepreinstall
in dependenciesinstall
in dependenciespostinstall
in dependenciesinstall
in the main packagepostinstall
in the main packageprepublish
in the main packageprepare
in the main package "allowScripts": {
"fsevents": "*", # allow install scripts in all versions
"node-sass": false, # ignore install scripts for all versions
"webpack-cli": "3.x.x" # allow all minors for v3, ignore everything else
}
Allowed package list is configurable in package.json
by adding an allowScripts
property, with an object where the key is a package name and the value is one of:
true
- allow all versions (equivalent to '*'
semver specifier)false
- ignore all versionsIf a package has a lifecycle script, but is neither allowed nor ignored, allow-scripts
will exit with an error.
FAQs
Execute allowed `npm install` lifecycle scripts
The npm package allow-scripts receives a total of 2 weekly downloads. As such, allow-scripts popularity was classified as not popular.
We found that allow-scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.