Prompt
I’m unhappy with storing secrets in environment variables and config files
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
That’s a good instinct. Environment variables and plain config files are convenient, but they’re not ideal for secrets because they can leak through logs, process listings, backups, crash dumps, CI output, or accidental commits.
Better options, depending on your setup:
- Secret managers:
- AWS Secrets Manager / SSM Parameter Store
- GCP Secret Manager
- Azure Key Vault
- HashiCorp Vault
- Managed identity / workload identity: avoid static secrets entirely when possible.
- Short-lived credentials: OAuth tokens, STS credentials, mTLS certs with rotation.
- Injected at runtime: mount secrets as files from a secret store or orchestrator rather than baking them into env vars.
- Local development: use a developer secret manager like 1Password CLI, Doppler, SOPS, or Vault Agent.
If you want, I can help you choose a pattern based on your environment, e.g.:
- Docker / Kubernetes
- AWS / Azure / GCP
- local app development
- CI/CD pipelines
- a specific language/framework