
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@kaliber/config
Advanced tools
A small, simple and dependency-free library for configuration
Do not use default.js
for development values that are different in other environments. In other words: only use default.js
for values that are the same for all environments.
Add local.js
to your .gitignore
file.
Define a configuration file
// config/test.js
module.exports = {
my_config_value: 'test'
}
Use the configuration
// index.js
const { my_config_value } = require('@kaliber/config')
console.log(my_config_value)
Run the command with the correct environment
CONFIG_ENV=test node index.js
Define a configuration file
// config/test.js
module.exports = {
my_config_value: 'test'
}
Load the configuration
// index.js
const load = require('@kaliber/config/load')
const { my_config_value } = load('test')
console.log(my_config_value)
default.js
and local.js
Order:
default.js
${CONFIG_ENV}.js
local.js
So any value from local.js
will override a value from one of the previous configuration files.
Any nested objects will be combined.
We used the config npm package but ran into trouble with out staging/acceptance environment. In that environment we wanted to compile with NODE_ENV=production
for performance benefits of certain libraries.
We also ran into trouble when we forgot to set an environment variable, the config
library provided a default instead of throwing an error.
Another motivation was that we only needed a very simple library, the config
library is 1750 line file full of usefull options that we did not need.
FAQs
Zero dependency, minimal configuration library operating on CONFIG_ENV
The npm package @kaliber/config receives a total of 1 weekly downloads. As such, @kaliber/config popularity was classified as not popular.
We found that @kaliber/config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.