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.
resolve-bin
Advanced tools
Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.
Resolves the full path to the bin file of a given package by inspecting the "bin"
field in its package.json.
var resolveBin = require('resolve-bin');
// package.json: "bin": "bin/tap.js"
resolveBin('tap', function (err, bin) {
if (err) return console.error(err);
console.log(bin);
});
// => [..]/resolve-bin/node_modules/tap/bin/tap.js
npm install resolve-bin
Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.
Name | Type | Argument | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
name | string | module name, i.e. 'tap' | |||||||
opts | Object |
<optional> | options Properties
| ||||||
cb | function | called back with the full path to the bin file of the module or an error if it couldn't be resolved |
Synchronous version of resolveBin
Name | Type | Argument | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
name | string | module name, i.e. 'tap' | |||||||
opts | Object |
<optional> | options Properties
|
generated with docme
MIT
FAQs
Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.
The npm package resolve-bin receives a total of 51,957 weekly downloads. As such, resolve-bin popularity was classified as popular.
We found that resolve-bin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.