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.
shellwords-ts
Advanced tools
JS lib with TS typings to manipulate strings according to the word parsing rules of the UNIX Bourne shell.
A JavaScript port of the Ruby module of the same name, with TypeScript typings. Shellwords provides functions to manipulate strings according to the word parsing rules of the UNIX Bourne shell. Originally forked from jimmycuadra/shellwords, this package is updated to be at parity with a modern reference implementation (Ruby 3.1.2 at the time of writing) and implements Shellwords.join()
, which was missing from the original package. The goal of this is to maintain parity with the Ruby Shellwords
module, so if there is a discrepancy, please file a bug (or even better, a PR).
Add "shellwords-ts" to your package.json
file and run npm install
.
import Shellwords from "shellwords-ts";
Shellwords.split("foo 'bar baz'"); // ["foo", "bar baz"]
Shellwords.escape("What's up?"); // "What\\'s\\ up\\?"
Shellwords.join(["find", "~/Library/Application Support", "-name", "*.plist"]); // "find \\~/Library/Application\\ Support -name \\*.plist"
Shellwords.split("foo 'bar baz' quu", (rawPart) => {
// have access to the chunks of the raw string as it is scanned
});
Shellwords.escape()
no longer escapes +
; see this commit in the GitHub Ruby repo.FAQs
JS lib with TS typings to manipulate strings according to the word parsing rules of the UNIX Bourne shell.
The npm package shellwords-ts receives a total of 12,146 weekly downloads. As such, shellwords-ts popularity was classified as popular.
We found that shellwords-ts 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.