1.5 KiB
1.5 KiB
Secret Rotation Runbook
Date: 2026-02-15
Scope: bot service + dashboard deployment secrets
Objective
Rotate all production credentials on a fixed cadence and after any suspected leak, while preserving service continuity.
Rotation Scope
- Supabase:
SUPABASE_KEY/ service-role key used by bot service- JWT settings (
SUPABASE_JWT_ISSUER,SUPABASE_JWT_AUDIENCE) verification values
- Exchange credentials:
ALPACA_API_KEY,ALPACA_API_SECRETREAL_ALPACA_API_KEY,REAL_ALPACA_API_SECRET
- AI provider keys:
OPENAI_API_KEYGEMINI_API_KEYPERPLEXITY_API_KEY
- Notification/API integration keys (if configured)
Rotation Procedure
- Create new credentials in provider consoles.
- Update secret stores (CI/CD, Azure, Vercel, etc.) with new values.
- Deploy bot and dashboard with new secret versions.
- Validate:
- bot startup + auth checks
- exchange order placement dry-run path
- dashboard auth and websocket connectivity
- Revoke old credentials only after validation window.
- Record rotation date, actor, and affected systems in release notes.
Enforcement
- CI includes executable secret hygiene scan:
scripts/verifySecretHygiene.ts
- Gitleaks workflow remains enabled on push/PR.
- Never commit real secrets into tracked files (
.env, docs, scripts, configs).
Cadence
- Standard: every 30 days
- Immediate rotation triggers:
- Secret leaked in logs/repo/chat/email
- Access control incident
- Team-member offboarding