
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
config-leaf
Advanced tools
config-leaf helps you hide your sensitive node.js bits in plain sight. It is based on John Resig's post, Keeping Passwords in Source Control.
The idea is that the configuration of deployed apps can be managed in version control for transparency and ease of rollback. But, since configuration often contains sensitive information like passwords, it shouldn't be kept in plaintext. This is where config-leaf comes in, by letting you encrypt your config in development, check it in, and then decrypt it in production or other dev environments.
Let's say that we have a node.js project with some sensitive configuration information, kept in a file called config.json.
First, install this library as a dependency of the project:
npm install config-leaf --save
Then, make sure that you add this file to .gitignore (or appropriate ignore file depending on your version control system) to make sure it never gets checked in:
echo config.json >> .gitignore
Finally, edit your package.json to add the encrypt and decrypt scripts, such as in the following:
{
"name": "my-project",
"version": "0.0.1",
"scripts": {
...
"encrypt": "encrypt config.json config.json.cast5",
"decrypt": "decrypt config.json.cast5 config.json"
}
}
Here, the encrypt script will encrypt the config.json file as config.json.cast5, and the decrypt script will decrypt the config.json.cast5 file as config.json. In both cases, the name of the encrypted file can be chosen arbitrarily.
Once config-leaf is installed and configured, run the encrypt command every time you update your configuration, and enter the password when prompted.
npm run encrypt
This saves the encrypted file according to the name you set in your package.json.
After checking the file in, use the decrypt command in production or other dev environments, and enter the password when prompted.
npm run decrypt
Again, this saves the decrypted file according to the name you set in your package.json.
(The MIT License)
Copyright (c) 2013 Jed Schmidt <where@jed.is>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Hide your sensitive node.js bits in plain sight.
The npm package config-leaf receives a total of 6 weekly downloads. As such, config-leaf popularity was classified as not popular.
We found that config-leaf 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.

Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.

Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.