
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@mapbox/decrypt-kms-env
Advanced tools
Simple util for decrypting secure environment variables encrypted using KMS
Simple utility for decrypting secure environment variables encrypted using KMS.
Use v1.x when you need to decrypt secure environment variables in a Dockerfile or shell script. In a failure situation, such as an with an incorrectly encrypted environment variable, this method will result in the process exiting with a non-zero exit code.
This method follows a simple convention whereby:
secure: (e.g., MySecretVar=secure:abcde1234),# Install
RUN curl -sL https://github.com/mapbox/decrypt-kms-env/archive/v1.0.6.tar.gz | tar --gunzip --extract --strip-components=1 --exclude=readme.md --directory=/usr/local
# Decrypt vars and start app
RUN . decrypt-kms-env && \
npm start
> . decrypt-kms-env
Decrypted SecureValueA=************1231
Decrypted SecureValueB=************913X
Use v3.x. If you don't have access to a shell to set env vars before starting your app, you can run decrypt-kms-env via JS.
Install:
npm install @mapbox/decrypt-kms-env --save
Use in JS:
var dke = require('@mapbox/decrypt-kms-env');
dke(process.env, function(err, scrubbed) {
if (err) throw err;
// Values in process.env are now decrypted.
// To debug use `scrubbed` instead of logging `process.env` directly.
// console.log(scrubbed);
});
FAQs
Simple util for decrypting secure environment variables encrypted using KMS
The npm package @mapbox/decrypt-kms-env receives a total of 309 weekly downloads. As such, @mapbox/decrypt-kms-env popularity was classified as not popular.
We found that @mapbox/decrypt-kms-env demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 28 open source maintainers 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 Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.

Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.

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.