r/javascript • • 14d ago

GitHub - pavex/safebox: One encrypted file with named secrets for a Node.js app, plus a CLI to manage it.

https://github.com/pavex/safebox

One encrypted file with named secrets for a Node.js app, plus a CLI to manage it.

You keep app.safebox next to the app: in the repository, in the deploy package. The app opens it with a password it gets from somewhere else and has every API key, database password and private key it needs. Without the password the file is useless.

  • AES-256-GCM with a key from scrypt, the whole file authenticated
  • TypeScript source with only Node.js built-in modules, no runtime dependencies
  • CLI as one bundled file, dist/safebox.js
  • Status: beta (0.1.0-beta.1), the file format may still change before 1.0

Requires Node.js 22 or newer.

0 Upvotes

6 comments sorted by

1

u/Discordbothost 14d ago

The old-copy note matters if this goes into Git: changing the safebox password doesn't revoke API keys in earlier commits. If the old password leaks, rotate the underlying keys too, not just the file password.

•

u/nielsen-b628 5h ago

Is the password separate in deployment? One file is simple, but it puts every credential behind one secret.

0

u/TheKingdutch 14d ago

How does this compare to something like https://getsops.io/ ?

1

u/monstropulos 3d ago

Different scope. SOPS is for teams and infrastructure, with multiple recipients and KMS. Safebox is a small single-purpose tool: one file, one password, read directly from a Node.js app with no dependencies. It doesn't try to compete with SOPS.