You adopt a secret scanner on a ten-year-old repo and it reports 400 historical findings.
IntermediateScenarioSecrets, Signing and Security
Answer
Situation read → You cannot block all work for historical issues, but you must stop new ones.
What I'd do →
- Run a full-history scan once; rotate anything still valid.
- Create a baseline so only new findings fail:
gitleaks detect --baseline-path gitleaks-baseline.json. - Enable the scanner in pre-commit and as a required CI check.
- Burn down the baseline over time.
Why → The baseline separates "known history" from "new risk", which keeps the gate usable.
Interview tip → Rotation matters more than whether history is rewritten.
More on Secrets, Signing and Security
A developer pushed an AWS access key to a public repo 10 minutes ago. What is your first move?BeginnerAfter rotating the leaked key, you must purge it from repository history. How?AdvancedA push is rejected: "GH013: Repository rule violations found ... Push cannot contain secrets". What do you do?IntermediateSecret scanning alerts have piled up, and many look like false positives or old test credentials.IntermediateYou must set up signed commits on your laptop. Which method do you pick?BeginnerYour GPG signing key expires next week. What is the correct way to handle it?Intermediate