Interview Prep/Real-World Interview/Security, compliance & cross-team work

Tell me about a time you handled a leaked secret.

AdvancedBehavioralSecurity, compliance & cross-team work
Answer

What they're really testing → Incident response for security events.

Sample STAR answer →

  • Situation: A developer pushed a database password to a public GitHub repo; GitHub secret scanning alerted us 4 minutes later.
  • Task: I was on call and led the response.
  • Action: I rotated the password immediately in Secrets Manager and restarted the dependent pods, checked database logs for connections from unknown IPs, made the repo private, and rewrote history with git filter-repo (while treating the secret as compromised regardless). I involved security and documented the timeline.
  • Result: Credential rotated in 18 minutes, no unauthorised access found. We enabled push protection on all repos and moved the app to IAM database authentication.

Avoid → Thinking deleting the commit is enough.

All Real-World Interview questions Roadmap: Interview readiness

More on Security, compliance & cross-team work