
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Removes your secret values in '.env' file and generate '.env-sample'. It supports multiline values and protects comments.
Removes your secret values in .env file and generates .env.sample or .env.dev or .env.test etc. file.
Supports multiline values (for example: RSA PRIVATE KEY) and protects your comments.
npm install env-sample -g
$ env-sample -h
Usage: env-sample [options]
Options:
-e, --env Source file. default is ".env"
-s, --sample Target file. default ".env-sample"
-m, --mask Mask character. example: "*", " ", etc.
default is "" (empty string)
-b, --banner Set your banner to bottom of target.
--banner="" Remove default banner.
-w, --watch Watch source file. If the source file is deleted,
the target file is also deleted.
-v, --version output the version number
-h, --help output usage information
npm install env-sample
const envSample = require('env-sample')
envSample()
option object parameterconst envSample = require('env-sample')
const options={
env: '.env',
sample: '.env-sample',
mask: '',
watch: false,
banner:`2023-Now (c) MiaJupiter. All rights reserved. https://miajupiter.com`
}
envSample(options)
.env# jwt variables
TOKEN_EXPIRES_IN=31536022 # valid for 1 year
TOKEN_PHRASE=upper520World
# MongoDB variables
# password special chars --> : / ? # [ ] @
# they must replace with uri equavalents :=%3A /=%2F ?=%3F #=%23 [=%5B ]=%5D @=%40
# mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]
MONGODB_MAINDB_URI=mongodb://localhost:27017/restApi
MONGODB_USERDB_URI='mongodb://localhost:27017/' # user database server
# Enable debug mode (true) or disable it (false).
DEBUG=false
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...
crt ys 319612719849...589317318614
Kh9NV...
...
-----END RSA PRIVATE KEY-----" # Make this variable too, let's see!
MY_NAME=shamanCoders
USER_ID=319817318 # for all mankind
TEST=4445
########################## TEST 7 7 7 ######################################
.env.sample# jwt variables
TOKEN_EXPIRES_IN= # valid for 1 year
TOKEN_PHRASE=
# MongoDB variables
# password special chars --> : / ? # [ ] @
# they must replace with uri equavalents :=%3A /=%2F ?=%3F #=%23 [=%5B ]=%5D @=%40
# mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]
MONGODB_MAINDB_URI=
MONGODB_USERDB_URI= # user database server
# Enable debug mode (true) or disable it (false).
DEBUG=false
PRIVATE_KEY= # Make this variable too, let's see!
MY_NAME=
USER_ID= # for all mankind
TEST=
########################## TEST 7 7 7 ######################################
# --------------------------------------------------------------------
# 2023-Now (c) MiaJupiter. All rights reserved. https://miajupiter.com
Copyright (c) 2023-Now MiaJupiter Technology Inc.. All rights reserved. We are proud to be Open Source. For full details about the license, please check the LICENSE file in the root directory of the source repository.
FAQs
Removes your secret values in '.env' file and generate '.env-sample'. It supports multiline values and protects comments.
We found that env-sample 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.