Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
An API to execute npm
commands programmatically.
npm install --save npm-cmd
var npm = require('npm-cmd');
npm.install(['express', 'cookie-parser'], {save: true, cwd: '/tmp'}, function(err) {
if (err) {
console.log('Installation failed.');
} else {
console.log('Installation succeeded!');
}
});
Run npm install
where:
pkgs
is an array of packages to install - optional
opts
is an object of key-value pairs - optional
opts.global
whether npm should install
opts.save
whether npm should save the packages to the dependencies
key in package.json
opts.saveDev
whether npm should save the packages to the devDependencies
key in package.json
opts.registry
the registry which npm should source package information from
done
is a function called when the command has finished - optional
Run npm dedupe
where:
pkgs
is an array of packages to dedupe - optionalopts
is an object of key-value pairs - optionaldone
is a function called when the command has finished - optionalGlobal options accepted by all commands:
opts.cwd
is the directory where the command will be runFAQs
An API to execute `npm` commands programmatically.
The npm package npm-cmd receives a total of 28 weekly downloads. As such, npm-cmd popularity was classified as not popular.
We found that npm-cmd 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.