
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
config-shield
Advanced tools
The mission behind this project is to provide a "safe" process from which to store properties sensitive in nature, in a manner that is both developer friendly as well as optimized for production use.
Install config-shield
in your project:
npm install config-shield --save
Startup the command-line interface from root of application:
npm run config-shield
: enter path of config (enter to use secure-config.json)>
: enter path of private key> my.app.key
set simple_property true
set my-json-prop { "nested": { "values": [ 1, 2, 3 ] } }
set null-prop null
set evaluable-prop-as-string "null"
set string-prop this will be stored as string if type cannot be determined
set array-pop [ 1, 2, 3 ]
set boolean-prop true
set number-prop 5
remove number-prop
get my-json-prop
: { "nested": { "values": [ 1, 2, 3 ] } }
save
: changes saved
exit
Optionally you may also install config-shield
globally:
npm install config-shield -g
config-shield
This step should be built into your CICD process, to clone the applicable
environment config and copy secure-config.json
over. Ideally these
assets will be in a limited-access store to avoid unnecessary risk.
Do not under any circumstance store your production private keys within your project.
var secureConfig = require('config-shield');
// one-time load
secureConfig.load({
configPath: './secure-config.json', // not required if default
privateKeyPath: '/etc/pki/tls/certs/my.app.key'
});
var myObj = secureConfig.getProp('my-json-prop');
Access your secure config from anywhere in your app:
var secureConfig = require('config-shield');
var myObj = secureConfig.getProp('my-json-prop');
Multiple configs? No problem:
var secureConfig = require('config-shield');
secureConfig.load({
instance: 'my-other-config',
configPath: './my-other-secure-config.json',
privateKeyPath: '/etc/pki/tls/certs/my.app.key'
});
var myOtherSecureConfig = secureConfig.instance('my-other-config');
var myObj = myOtherSecureConfig.getProp('my-prop');
Optionally you may include your development private key within your project to keep things simple, but please do not do this for production environments as you'll be negating the value of this module. Only a limited few should have access to production private keys.
var secureConfig = require('config-shield');
false
) - Write old config values as backup
to allow for a rotationary period where
old key will continue to work.In the case you have keys that must be rotated, you can use the convert with backup
option. The process would
require you to:
backup
to true
.dropBackup
.In CLI, would look something like:
config-shield
enter path of config> secure-config.json
enter path of private key> old.key
> convert
enter path of private key> new.key
backup old values to enable key rotations? (enter to disable, or `true`)> true
> save
> exit
Deploy your change, then update your config one last time:
config-shield
enter path of config> secure-config.json
enter path of private key> new.key
> dropBackup
> save
> exit
Deploy the final config. If you skip the step of dropping the backup, your config will become vulnerable to attacks using the old private key, negating most of the value of rotating keys.
Possible future enhancements:
FAQs
Store and retrieve data sensative in nature
We found that config-shield 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.