How do you stop secrets from being committed in the first place?
IntermediateScenarioSecrets, Supply Chain and DORA
Answer
Situation read → Preventive controls at several layers.
What I'd do →
- Local pre-commit hook with gitleaks or detect-secrets.
- Server-side: GitHub secret scanning with push protection or GitLab secret push protection.
- CI scan on every PR as a backstop.
Why → Layered detection catches what one layer misses.
Interview tip → Prevention beats cleanup.
More on Secrets, Supply Chain and DORA
A developer committed an AWS key to a public repo. Walk through your response.BeginnerThe pipeline needs access to 15 different secrets across environments. How do you manage them?IntermediateExplain SLSA and how you would raise a pipeline's level.AdvancedHow do you verify only signed images run in Kubernetes?AdvancedA popular npm package your build uses is reported as compromised. What do you do?AdvancedDependency update PRs pile up. How do you keep dependencies fresh without chaos?Intermediate