
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.
Read a simple bash config file (simple variables and values) and convert into a Javascript object.
Read a simple bash config file (simple variables and values) and convert into a Javascript object.
This allows you to keep API keys, Database names etc out your source code and in a shareable location that both bash and node scripts can read.
It's intended to read a simple text file like this:
EMPTY_VAR=
FOO=BAR
this line will be ignored
Which has been used in a bash script like this:
# set vars
. /path/to/config/file.cfg
export FOO
var path = process.argv[ 2 ],
BashConf = require('bash-conf'),
bashConf = new BashConf();
bashConf
.read( path )
.then(function( data ) {
console.log( 'what is foo', data.FOO );
console.log( 'this should be empty -> [', data.EMPTY_VAR, ']' );
})
.catch( function( err ) {
console.log( err );
});
Lines that don't match the regex pattern are simply ignored and not parsed.
$ node test.js
No path supplied
$ node test.js aintnofile.cfg
Could not read conf file aintnofile.cfg
FAQs
Read a simple bash config file (simple variables and values) and convert into a Javascript object.
We found that bash-conf 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.