Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
wild-config
Advanced tools
Opinionated configuration management module for Node.js daemon applications.
wild-config loads configuration from application config directory and from a config path if provided. All configuration files use toml syntax.
wild-config tries to load configuration in the following order (missing files are skipped, except the one provided by --config argument). Values are merged.
--config
or -c
argument valueIn case of command line arguments only such keys are merged that already exist in the configuration object. For subkeys use dot notation. Value type (numbers, booleans and strings are supported) is defined by existing value.
Example default.toml
[server]
enabled=false
Override server.enabled with the following command line:
node app.js --server.enabled=true
If you are running your app as a service daemon, then you can load configuration from a config file from a common config folder, eg. /etc by using the ``--config` argument. These values are loaded and merged with the default values.
[Service]
WorkingDirectory=/opt/application
ExecStart=/usr/bin/node index.js --config=/etc/app.toml
const config = require('wild-config');
console.log(config.server.enabled); // false
wild-config catches SIGHUP signal and reloads configuration files. Additionally a 'reload' event is emitted.
const config = require('wild-config');
config.on('reload', ()=>{
console.log('Configuration was updated');
console.log('New "server.enabled" value: %s', config.server.enabled);
});
MIT
FAQs
Configuration management module
The npm package wild-config receives a total of 398 weekly downloads. As such, wild-config popularity was classified as not popular.
We found that wild-config demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.