
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
making configuration phase, in your application. (Tiny version of almost pyramid's configurator object)
# yourapp/__init__.py
from miniconfig import ConfiguratorCore
class Configurator(ConfiguratorCore):
def make_app(self):
self.commit()
return App(self.settings)
class App:
def __init__(self, settings):
self.settings = settings
yourapp/pluginA.py
class A:
pass
def includeme(config):
config.settings["A"] = A()
yourapp/pluginB.py
class B:
pass
def includeme(config):
config.include(".pluginA")
config.settings["B"] = B()
application user
from yourapp import Configurator
config = Configurator()
config.include("yourapp.pluginB")
app = config.make_app()
print(app.settings.keys()) # dict_keys(['A', 'B'])
directive means that action of configurator.
how to define and use directive
def hello(config, name):
def register():
assert config.settings["foo"] == "foo"
print("hello: {}".format(name))
discriminator = (hello, name)
config.action(discriminator, register)
config = Configurator(settings={"foo": "foo"})
config.add_directive("hello", hello)
config.hello("foo")
it is also supported that to define directives by dotted name
foo/bar.py
def hello(config):
def register():
print("hai")
discriminator = id(object()) # xxx
config.action(discriminator, register)
yourapp
config = Configurator()
config.add_directive("hello", "foo.bar:hello")
config.hello()
config.commit() # hai
FAQs
-
We found that miniconfig 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
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.