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.
multienv-loader
Advanced tools
A configurable
.env
file loader for multiple environments inspired by dotenv and vue-cli
yarn add multienv-loader
npm install multienv-loader
At the top of your entry file:
require('multienv-loader').load() // or load(options)
Or directly from terminal (without options):
node -r multienv-loader/load your_script.js
options.mode
: Environment mode. Defaults to process.env.NODE_ENV
options.envPath
: Location of dotenv files. Defaults to process.cwd()
options.envFiles
: Array of dotenv filenames to load in order. Defaults to ['.env', '.env.[mode]', '.env.local', '.env.[mode].local']
options.dry
: Does not modify process.env
. Defaults to false
options.override
: Existing variables in process.env
will be overriden by the dotenv files. Defaults to false
options.filter
: Function that gets a variable name as first argument and returns whether or not it should be loaded. Defaults to () => true
.gitignore
# Local Env Files
.env.local
.env.*.local
Internal functions like parse
or safeLoad
are also exposed.
FAQs
A configurable dotenv loader for multiple environments
The npm package multienv-loader receives a total of 25 weekly downloads. As such, multienv-loader popularity was classified as not popular.
We found that multienv-loader 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.