Secrets, access, least privilege
Who this is for
Section titled “Who this is for”Everyone who holds credentials or grants access.
When to use it
Section titled “When to use it”When you store, share, or rotate a secret, or grant access.
- Must: Secrets live in a secrets manager or the CI secret store, injected at run or deploy time. Not in git, images, tickets, or chat.
- Must: If a secret was pasted into chat, a ticket, or a PR, rotate it. Treat it as public.
- Must: Access is least privilege and named. Do not share a personal prod login. Infrastructure grants follow Infrastructure and access.
- Should: Rotate credentials when someone leaves the project, and when you cannot say who still has a copy.
- Should: Use short-lived roles or SSO where the host allows it, instead of long-lived keys on laptops.
- Team decides: Which manager (cloud, CI, or password vault) holds which class of secret. AWS detail is on AWS.
What good looks like
Section titled “What good looks like”A new engineer gets a role, not a screenshot of keys, and a leaked paste gets rotated the same day.
What to do
Section titled “What to do”- Put new secrets in the agreed store. Reference them by name in config.
- Never commit
.envfiles that contain real values. Commit an example with placeholders. - If you find a secret in git, rotate, purge if you can, and follow report.
- Grant the smallest access that unblocks the work. Remove it when the work ends.