Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@nodesecure/scanner
Advanced tools
Readme
⚡️ Run a static analysis of your module's dependencies.
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @nodesecure/scanner
# or
$ yarn add @nodesecure/scanner
import * as scanner from "@nodesecure/scanner";
import fs from "fs/promises";
// CONSTANTS
const kPackagesToAnalyze = ["mocha", "cacache", "is-wsl"];
const payloads = await Promise.all(
kPackagesToAnalyze.map((name) => scanner.from(name))
);
const promises = [];
for (let i = 0; i < kPackagesToAnalyze.length; i++) {
const data = JSON.stringify(payloads[i], null, 2);
promises.push(fs.writeFile(`${kPackagesToAnalyze[i]}.json`, data));
}
await Promise.allSettled(promises);
See types/api.d.ts
for a complete TypeScript definition.
function cwd(path: string, options?: Scanner.Options): Promise<Scanner.Payload>;
function from(packageName: string, options?: Scanner.Options): Promise<Scanner.Payload>;
function verify(packageName: string): Promise<Scanner.VerifyPayload>;
Options
is described with the following TypeScript interface:
interface Options {
readonly maxDepth?: number;
readonly usePackageLock?: boolean;
readonly vulnerabilityStrategy: Strategy.Kind;
readonly forceRootAnalysis?: boolean;
readonly fullLockMode?: boolean;
}
Thanks goes to these wonderful people (emoji key):
Gentilhomme 💻 📖 👀 🛡️ 🐛 | Tony Gorez 💻 📖 👀 🐛 | Haze 💻 | Maksim Balabash 💻 |
MIT
FAQs
A package API to run a static analysis of your module's dependencies.
We found that @nodesecure/scanner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).