In plain words
Rotating a secret means issuing a new key, deploying it, confirming everything uses it and then revoking the old one, done on a schedule and immediately whenever the key may have leaked.
Where you see it
A Harbor engineer pastes a Stripe secret key into a public gist by mistake. Deleting the gist isn't enough, because the key may already be copied. The fix is to roll the key in Stripe's dashboard, update the secret store, redeploy, and check Stripe's logs for calls you didn't make.
What goes wrong
- Revoking before deploying
Switch the old key off first and every service still using it fails at once. Run old and new side by side, move everything over, then revoke.
- Deleting the commit and calling it done
Automated scanners find keys in public repos within minutes, and removing the commit doesn't take the key back. Rotate it, then clean the history if you need to.
- Secrets that can't be rotated quickly
A key hardcoded in a dozen files or a shipped mobile app takes days to change. Read secrets from one place at runtime, so rotating is a config change and a restart.
What to tell your agent
Quick check
Sign in to earn +10 XP for itA Harbor API key was committed to a public repo an hour ago, and you've deleted the commit. What's left to do?