Prompt
What should I use for secret rotation in a dev team with lots of repos?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
For a dev team with lots of repos, the best default is:
Use a centralized secret manager + short-lived credentials + automated rotation, rather than putting secrets in repos or rotating them manually.
Good choices
If you want a managed cloud-native option
- AWS Secrets Manager / AWS Systems Manager Parameter Store
- GCP Secret Manager
- Azure Key Vault
These work well if your repos are spread across services and environments, because they:
- keep secrets out of code
- support IAM-based access
- can automate rotation for some secret types
- integrate with CI/CD and runtime workloads
If you want cloud-agnostic / multi-cloud
- HashiCorp Vault
Good when you need:
- one system across many repos, teams, and clouds
- dynamic secrets
- lease-based credentials
- strong control over policies and rotation workflows
What I’d recommend in practice
For a dev team with lots of repos, use this pattern:
-
Store secrets centrally
- not in Git
- not in
.envfiles committed to repos
-
Use secret injection at runtime
- app loads secrets from the manager
- CI/CD fetches them only when needed
-
Prefer short-lived credentials
- OIDC-based auth from GitHub Actions/GitLab CI to cloud providers
- avoid long-lived static tokens where possible
-
Automate rotation
- rotate automatically for database creds, API keys, service accounts
- alert on failures
-
Scan repos anyway
- use secret scanning in GitHub/GitLab/Bitbucket plus pre-commit hooks
- treat this as backup defense, not the main control
If you need a simple decision
- Single cloud → use that cloud’s secret manager
- Multiple clouds / lots of teams / complex access → Vault
- Just need repo scanning and light secret storage → still use a secret manager; don’t rely on GitHub Secrets alone for everything
Important note
GitHub Actions secrets, GitLab CI variables, etc. are useful for CI, but they’re not a full secret rotation strategy. They’re best as delivery mechanisms, not the source of truth.
If you want, I can suggest a specific setup based on your stack:
- GitHub/GitLab/Bitbucket?
- AWS/GCP/Azure/on-prem?
- Kubernetes or not?
- how many repos/teams?