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.
@types/shell-quote
Advanced tools
npm install --save @types/shell-quote
This package contains type definitions for shell-quote (https://github.com/substack/node-shell-quote).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shell-quote.
// Type definitions for shell-quote 1.7
// Project: https://github.com/substack/node-shell-quote
// Definitions by: Jason Cheatham <https://github.com/jason0x43>
// Cameron Diver <https://github.com/CameronDiver>
// Opportunity Liu <https://github.com/OpportunityLiu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export type ControlOperator = "||" | "&&" | ";;" | "|&" | "<(" | ">>" | ">&" | "&" | ";" | "(" | ")" | "|" | "<" | ">";
export type ParseEntry =
| string
| { op: ControlOperator }
| { op: "glob"; pattern: string }
| { comment: string };
export interface ParseOptions {
/**
* Custom escape character, default value is `\`
*/
escape?: string | undefined;
}
/**
* Return a quoted string for the array `args` suitable for using in shell commands.
*/
export function quote(args: ReadonlyArray<string>): string;
/**
* Return an array of arguments from the quoted string `cmd`.
*
* Interpolate embedded bash-style `$VARNAME` and `${VARNAME}` variables with the `env` object which like bash will replace undefined variables with `""`.
*/
export function parse(
cmd: string,
env?: { readonly [key: string]: string | undefined },
opts?: ParseOptions,
): ParseEntry[];
/**
* Return an array of arguments from the quoted string `cmd`.
*
* Interpolate embedded bash-style `$VARNAME` and `${VARNAME}` variables
* with the `env` object which like bash will replace undefined variables with `""`.
*
* @param env
* A function to perform lookups.
* When env(key) returns a string, its result will be output just like env[key] would.
* When env(key) returns an object, it will be inserted into the result array like the operator objects.
*/
export function parse<T extends object | string>(
cmd: string,
env: (key: string) => T | undefined,
opts?: ParseOptions,
): Array<ParseEntry | T>;
These definitions were written by Jason Cheatham, Cameron Diver, and Opportunity Liu.
FAQs
TypeScript definitions for shell-quote
The npm package @types/shell-quote receives a total of 337,689 weekly downloads. As such, @types/shell-quote popularity was classified as popular.
We found that @types/shell-quote 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.
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.