Interview Prep/CI/CD/Secrets, Supply Chain and DORA

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 →

  1. Local pre-commit hook with gitleaks or detect-secrets.
  2. Server-side: GitHub secret scanning with push protection or GitLab secret push protection.
  3. CI scan on every PR as a backstop.

Why → Layered detection catches what one layer misses.

Interview tip → Prevention beats cleanup.

All CI/CD questions

More on Secrets, Supply Chain and DORA