Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@mikestaub/simple-secrets
Advanced tools
This is a small, opinionated library for managing app secrets. The developer now must only manage a single, master key to access all sensitive data for the project.
For small to medium sized projects and teams, this approach should be sufficient. For a more robust / complex solution, something like HashiCorp Vault or AWS Secrets Manager should be used.
module.exports = {
API_KEY: {
staging: "123",
production: "345"
}
}
"scripts": {
"encrypt": "simple-secrets encrypt",
"decrypt": "simple-secrets decrypt",
}
export ENCRYPTION_KEY=some-secret-string
npm run encrypt
export ENCRYPTION_KEY=some-secret-string
npm run decrypt
It is assumed there exists a 'secrets.js.encrypted' file in the current working directory that can be or decrypted with the key specified by the 'ENCRYPTION_KEY' environment variable.
To print the secrets to stdout, use:
simple-secrets print
To inject the secrets into process.env use:
simple-secrets export
This approach assumes that the master encyption key is kept secret and safe. If it is ever made public, assume all credentials in secrets.js are compromised.
FAQs
Utilities for managing encrypted secrets.
The npm package @mikestaub/simple-secrets receives a total of 5 weekly downloads. As such, @mikestaub/simple-secrets popularity was classified as not popular.
We found that @mikestaub/simple-secrets 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.