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.
A minimum-viable arguments parser in ~90 LOC with zero dependencies
--
--version
or -v
--help
or -h
$ npm install --save clinical
#!/usr/bin/env node
import clinical from 'clinical'
try {
const result = clinical('1.0.0', 'my help message')
console.log(result)
} catch (error) {
console.error(error.message)
process.exit(1)
}
$ my-cli --foo --bar 42 -x=y -- baz null
{
options: { foo: true, bar: 42, x: 'y' },
positionals: [ 'baz', null ]
}
$ my-cli --version
1.0.0
$ my-cli --help
my help message
import clinical from 'clinical'
version
(string
) – Required. Writes this string to stdout
on encountering the --version
or -v
flag, then exits the process
.helpMessage
(string
) – Required. Writes this string to stdout
on encountering the --help
or -h
flag, then exits the process
.args
(Array<string>
) – Optional. The arguments to be parsed. Defaults to process.argv.slice(2)
.The returned result
object has the following keys:
positionals
(Array<boolean | null | number | string>
)options
({ [key: string]: boolean | null | number | string }
)$ npm install --save clinical
FAQs
A minimum-viable arguments parser in ~90 LOC with zero dependencies
The npm package clinical receives a total of 0 weekly downloads. As such, clinical popularity was classified as not popular.
We found that clinical 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.