Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
pinst
lets you havepostinstall
hook that runs only in dev 🍺
Important if your project is using npm or pnpm, you can achieve the desired effect by setting a prepare
hook instead. pinst
is mainly useful for Yarn 2+ since it doesn't support prepare
hook. See https://yarnpkg.com/advanced/lifecycle-scripts
// package.json
{
"scripts": {
"postinstall": "<some dev only command>",
"prepack": "pinst --disable",
"postpack": "pinst --enable"
}
}
On prepack
, postinstall
will be renamed to _postinstall
(disabled)
On postpack
, it will be renamed back to postinstall
(enabled)
pinst
accepts the following flags:
--enable, -e Enable postinstall hook
--disable, -d Disable postinstall hook
--silent, -s
By inverting commands, you can also use pinst
to enable postinstall
for your users only and not yourself.
pinst
also supports install
alias.
MIT - Typicode :cactus:
FAQs
Enable or disable npm postinstall hook
The npm package pinst receives a total of 73,552 weekly downloads. As such, pinst popularity was classified as popular.
We found that pinst 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.