Interview Prep/DevSecOps/Pipeline Security Scanning

Developers bypass your pre-commit secret scan with `git commit --no-verify`. How do you close the gap?

IntermediateScenarioPipeline Security Scanning
Answer

Situation read → Client-side hooks are advice, not enforcement. They can always be skipped.

What I'd do →

  1. Keep the pre-commit hook for fast feedback (pre-commit framework with gitleaks).
  2. Enforce the same scan in CI as a required status check on the protected branch.
  3. Turn on server-side push protection (GitHub secret scanning push protection, GitLab push rules).
  4. Run a scheduled full-history scan across all repos.

Why → Defence in depth: the hook helps the honest developer, the server-side control stops the rest.

Interview tip → "Never rely on client-side controls for enforcement."

All DevSecOps questions Roadmap: Security in the pipeline

More on Pipeline Security Scanning