Use this as the starting point for handling credentials safely.
Secrets · Secrets Management
Secrets are credentials that grant access — passwords, API keys, tokens, certificates and private keys. Anyone who has one can act as its owner, so they need storage, access control and rotation.
1. Secrets: passwords, API keys, tokens, private keys, connection strings.
2. Inventory and owners.
3. Store in a secret manager.
4. Rotate.
5. Monitor for leaks.
secret created → stored securely → used → rotated → revoked
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Shared secrets used by many apps, so rotation breaks everything.
- Leaked secret removed from Git but not rotated (history keeps it).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Secrets grant access to whoever holds them.
- Store, restrict, audit and rotate.
- Assume leaked secrets will be used.
gitleaks detect --source .— find secrets in codetrufflehog git file://.— history scan- Secret owners and rotation dates — inventory
ReferenceWhy it matters1 section · depth on demand
Lifecycle
1. Create with enough entropy.
2. Store in a secret manager.
3. Grant access to specific identities.
4. Rotate on schedule and on exposure.
5. Revoke and delete when no longer used.
6. Audit every read.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
A secret is any value that grants access or shows identity: passwords, API keys, tokens, private keys, certificates, connection strings, encryption keys. Treat anything that would let someone act as a system or user as a secret.
| Secret type | Typical risk |
|---|---|
| Passwords | Reuse, weak values, sharing |
| API keys/tokens | Long-lived, broad scope, leaked in code |
| Private keys | Copied between systems, unprotected files |
| Database connection strings | Embedded in config files |
| Cloud credentials | Full account access if leaked |
Inventory where secrets exist, who owns them and when they expire — you cannot rotate or protect secrets you do not know about.
ReferenceConfiguration & state1 section · depth on demand
Lifecycle
Use least privilege, bounded rollout and explicit exception handling.
Preserve a known-good pre-state, validate dependencies and trust anchors before disruptive changes, and avoid weakening a control merely to make a test pass.
Secrets, private keys, tokens and sensitive indicators remain redacted while stable references survive.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Secrets Management → Secrets. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html · confidence 94%