
Research
lightning PyPI Package Compromised in Supply Chain Attack
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.
modern-spawn
Advanced tools
A set of spawn and exec functions that match the API you need 90% of the time in modern applications.
yarn add modern-spawn
import {spawnBuffered} from 'modern-spawn';
const hello = await spawnBuffered('echo', ['hello world']).getResult('utf8');
console.log(hello);
export interface Result {
readonly command: string;
readonly args: readonly string[] | undefined;
readonly stdout: Buffer;
readonly stderr: Buffer;
readonly status: number | null;
getResult(): Buffer;
getResult(encoding: string): string;
}
export interface ResultPromise extends Promise<Result> {
getResult(): Promise<Buffer>;
getResult(encoding: string): Promise<string>;
}
export interface SpawnBufferedOptions extends SpawnOptions {
debug?:
| boolean
| {
stdout?: boolean;
stderr?: boolean;
};
}
export function spawnBuffered(
command: string,
args: string[],
opts?: SpawnBufferedOptions,
): ResultPromise;
export function spawnBufferedSync(
command: string,
args: string[],
opts: SpawnBufferedOptions,
): Result;
export interface ExecBufferedOptions extends ExecOptions {
debug?:
| boolean
| {
stdout?: boolean;
stderr?: boolean;
};
}
export function execBuffered(
command: string,
options?: ExecBufferedOptions,
): ResultPromise;
export function execBufferedSync(
command: string,
options?: ExecBufferedOptions,
): Result;
getResult can be used to request stdout as either a Buffer or string and automatically throw an error with plenty of context if the process exited with a non-zero status code.debug to true if you want to pipe log stdout & stderr to the parent process for debugging, in addition to buffering it.execBufferedSync does returns an empty Buffer for stderr unless the process exits with a non-zero exit code. This is due to a limitation of the node.js API.FAQs
modern-spawn
The npm package modern-spawn receives a total of 2,069 weekly downloads. As such, modern-spawn popularity was classified as popular.
We found that modern-spawn 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.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.