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.
More on Security, compliance & cross-team work
Tell me about a time you worked with the security team on a vulnerability.BeginnerTell me about a time you found a security issue in your own infrastructure.IntermediateDescribe a time you prepared infrastructure for a compliance audit (SOC 2, ISO 27001, PCI).IntermediateTell me about a time a security requirement slowed delivery. How did you handle it?IntermediateDescribe a time you introduced a security tool into the CI/CD pipeline.BeginnerTell me about a time you had to work with legal or compliance on a technical decision.Intermediate