Interview Prep/Real-World Interview/Secrets, security & access

How did you scan for secrets accidentally committed to Git?

BeginnerBehavioralSecrets, security & access
Answer

Good answer looks like → "Gitleaks as a pre-commit hook and in CI on every PR, plus GitHub secret scanning with push protection enabled for the org. When something was found, we treated it as compromised and rotated it first, then cleaned history."

Follow-ups to expect → Is removing it from history enough? How did you handle false positives?

Red flags → "We'd just delete the commit."

All Real-World Interview questions Roadmap: Interview readiness

More on Secrets, security & access