Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/jba/cli
Why another package for simplifying command-line programs?
My typical command-line program is a development tool that doesn't require much beyond some simple, in-program documentation. So I wanted something easy to use and understand. I find many of the existing packages dauntingly complex.
I also had the idea of using struct tags to describe flags and arguments. This virtually eliminates the painful boilerplate of checking the number of arguments and then parsing the strings. Instead, one defines a struct with fields of the desired types, and the struct's Run method has those fields at hand, assigned and validated. I've only seen this idea in one other package, github.com/mkideal/cli, but there it is only applied to flags, not positional arguments.
Define flags and arguments with struct field tags.
Nested commands.
Shell completion.
Multi-valued flags: parsing comma-separated flag values into a slice.
Oneofs: specify a list of valid strings for a flag or argument.
FAQs
Unknown package
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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.