
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Check licenses of installed dependencies and their transitive dependencies and compare them to a give whitelist.
Your advocate doesn't let you down. He analyzes the licenses of all installed npm modules of your project and their transitive dependencies and compares them to a given whitelist.
This package works with yarn.
npm install advocate --save-dev
Advocate can be used as part of your project's automated tests. That way, you ensure to only use modules with whitelisted licenses.
advocate({licenses: ['MIT']})
.then(function(moduleInformation) {
for (module of moduleInformation.violatingModules) {
console.log(`
I advise you to not use ${module.name}@${module.version}
because of the license ${module.license}.
`);
}
});
Output:
I advise you to not use spdx-exceptions@1.0.4
because of the license CC-BY-3.0.
Determines modules whose license descriptions do not satisfy the given whitelist. In order to determine the license of a module, advocate
respects the package.json
but also tries to guess the license using text files such as README
or LICENSE
.
{
allModules: Array<Module>
violatingModules: Array<Module>
}
Example:
{
"module1@1.0.0": {
"name": "module1",
"version": "1.0.0",
"license": "MIT"
}
}
{
licenses: Array<LicenseString>,
licenseExceptions: Array<LicenseException>,
modules: Array<WhitelistedModule>
}
{
name: string
license: LicenseString
version: string
}
Either a SPDX expression or a simple license identifier
string
{
path?: string // default: cwd
dev?: boolean, // default: false
}
Specifies the directory of the npm module whose dependencies will be analyzed by advocate
.
Defaults to the current working directory.
Specifies whether to analyze production or development dependencies.
A value of false
means advocate
only respects your production dependencies and their transitive ones.
A value of true
means advocate
will only respect your devDependencies
and their transitive production dependencies. advocate
will never respect transitive devDependencies
.
Defaults to false
.
FAQs
Check licenses of installed dependencies and their transitive dependencies and compare them to a give whitelist.
The npm package advocate receives a total of 6 weekly downloads. As such, advocate popularity was classified as not popular.
We found that advocate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.