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.
Converts environment variables into cli arguments for easy maintainable docker entry point
Instead of maintain ugly and long entrypoint scripts to call your module with environment variables as arguments from your dockerfile, just add this elegant converting framework from environment variables to cli command line arguments.
.. code-block:: bash
pip install env2cli
Assume your old dockerfile looked like this
.. code-block:: Dockerfile
...
ENV POSITIONAL_ARG val
ENV SOME_PARAM value
ENV OTHER_PARAM valy
...
ENTRYPOINT python main.py ${POSITIONAL_ARG} -p ${SOME_PARAM} --other ${OTHER_PARAM} ...
Add new file, for example, entrypoint.py
like this:
.. code-block:: python
from main import main
from env2cli import *
argv = bulk_apply([
Argument('POSITIONAL_ARG'),
Argument('SOME_PARAM', '-p'),
Argument('OTHER_PARAM', '--other')
])
main(argv)
And the new dockerfile should be looking like this:
.. code-block:: Dockerfile
ENV POSITIONAL_ARG val
ENV SOME_PARAM value
ENV OTHER_PARAM valy
...
ENTRYPOINT python entrypoint.py
Or even if your program isn't python!
.. code-block:: Dockerfile
ENV POSITIONAL_ARG val
ENV SOME_PARAM value
ENV OTHER_PARAM valy
...
ENTRYPOINT ./myprog $(env2cli.py)
# instead ENTRYPOINT ./myprogram ${POSITIONAL_ARG} -p ${SOME_PARAM} --other ${OTHER_PARAM}
FAQs
Converts environment variables into cli arguments for easy maintainable docker entry point
We found that env2cli demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
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.