
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
dotenv-json-complex
Advanced tools
Load complex enviroment variable via JSON file
With Nodejs installed run the installation command in a terminal:
npm install dotenv-json-complex
Create a .env.json
file in the root of your project:
{
"my_app_env": {
"nodeEnv": "development",
"api": {
"prefix": "/api"
},
"database": {
"username": "foo",
"password": "bar",
"name": "awesome_db_name",
"host": "my_db_host"
}
}
}
After that, load your environment variables by requiring the dotenv dotenv-json-complex and executing it:
// here you load the json to your process.env
require("dotenv-json-complex")();
const env = JSON.parse(process.env.my_app_env);
// this will print your complex json environment!
console.log(env)
// like this
{
"nodeEnv": "development",
"api": {
"prefix": "/api"
},
"database": {
"username": "foo",
"password": "bar",
"name": "awesome_db_name",
"host": "my_db_host"
}
}
Furthermore you can provide an object to change environment filename:
require("dotenv-json-complex")({ environment: 'qa' });
This will look for .env.qa.json
file and load it in memory.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
Load complex enviroment variable via JSON file
The npm package dotenv-json-complex receives a total of 535 weekly downloads. As such, dotenv-json-complex popularity was classified as not popular.
We found that dotenv-json-complex 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.