
Research
Malicious Go “crypto” Module Steals Passwords and Deploys Rekoobe Backdoor
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.
envier
Advanced tools
Envier is a Python library for extracting configuration from environment variables in a declarative and (eventually) 12-factor-app-compliant way.
The following example shows how to declare the configuration for an application
that uses the MYAPP_DEBUG, MYAPP_SERVICE_HOST and MYAPP_SERVICE_PORT
variables from the environment.
>>> from envier import Env
>>>
>>> class GlobalConfig(Env):
>>> __prefix__ = "myapp"
>>>
>>> debug_mode = Env.var(bool, "debug", default=False)
>>>
>>> service_host = Env.var(str, "service.host", default="localhost")
>>> service_port = Env.var(int, "service.port", default=3000)
>>>
>>> _is_default_port = Env.der(bool, lambda c: c.service_port == c.spec.service_port.default)
>>>
>>> config = GlobalConfig()
>>> config.service_port
3000
>>> config._is_default_port
True
Configurations can also be nested to create namespaces:
>>> from envier import Env
>>>
>>> class ServiceConfig(Env):
>>> __prefix__ = "service"
>>>
>>> host = Env.var(str, "host", default="localhost")
>>> port = Env.var(int, "port", default=3000)
>>>
>>> class GlobalConfig(Env):
>>> __prefix__ = "myapp"
>>>
>>> debug_mode = Env.var(bool, "debug", default=False)
>>>
>>> service = ServiceConfig
>>>
>>> config = GlobalConfig()
>>> config.service.port
3000
The same configuration can be obtained with implicit nesting by declaring the
ServiceConfig subclass inside GlobalConfig, and setting the class attribute
__item__ to the name of the item the sub-configuration should be assigned to,
viz.
>>> from envier import Env
>>>
>>> class GlobalConfig(Env):
>>> __prefix__ = "myapp"
>>>
>>> debug_mode = Env.var(bool, "debug", default=False)
>>>
>>> class ServiceConfig(Env):
>>> __item__ = __prefix__ = "service"
>>>
>>> host = Env.var(str, "host", default="localhost")
>>> port = Env.var(int, "port", default=3000)
>>>
>>> config = GlobalConfig()
>>> config.service.port
3000
The library ships with a mypy plugin to allow for type checking. If you want
to use it, either install the library with the mypy extra or ensure that
mypy is installed, and then add envier.mypy to the list of extra plugins in
the mypy configuration.
FAQs
Python application configuration via the environment
We found that envier 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
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.

Security News
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.