Interview Prep/CI/CD/Secrets and Credentials

What do you do after a secret is committed to Git?

IntermediateProductionSecrets and Credentials
Answer
  1. Revoke or rotate the secret immediately; this is the only real fix.
  2. Check provider audit logs (CloudTrail, GitHub audit log) for use during the exposure window.
  3. Optionally rewrite history with git filter-repo and force-push, then have everyone re-clone; forks and caches may still hold it.
  4. Add a scanner rule and push protection to prevent recurrence.
  5. Write a short post-incident note: how it got there, how long it was exposed.
All CI/CD questions

More on Secrets and Credentials