Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
bitbucket.org/heapsapp/envflag
Package envflag
is a Go package that
exposes environment variables for all the flags within
a flag.FlagSet
.
It came out of a response to a Reddit post by jalquiza about their envy package.
This package differs from that one in several ways:
the usage is slightly different, it is not a drop in replacement
it can be used with any flag.FlagSet
, not just flag.CommandLine
it tries harder (compared to the original envy
) to avoid effecting
the reported argument defaults or the results of functions/methods such as
flag.Visit
and flag.NFlag
if there are any errors parsing environment variables (e.g. a string value where an interger value is expected) the first such encountered is returned
See the GoDoc documentation for complete examples but basically you can just replace the call to:
flag.Parse()
with:
envflag.Parse("PROGNAME", true)
to have envirment variables such as PROGNAME_PORT
be used for
the program's -port
argument when no such argument is provided.
This package is Copyright 2017, Dave Chapeskie.
You are free to do with it anything you want, with the sole exception being you cannot replicate this package and claim you wrote it.
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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.