A developer pushed `--no-verify` and the pre-commit secret hook never ran; the secret is now on a feature branch
BeginnerTroubleshootingSAST, SCA and secrets scanning in CI
Answer
Likely causes → Client-side hooks are optional by design and can always be skipped.
Diagnose →
gitleaks detect --log-opts="origin/main..feature/x" -v
Fix → Treat it as leaked: revoke and rotate the credential first, then remove it from the branch. Do not just delete the line.
Prevent → Back the hook with server-side controls: GitHub push protection / GitLab secret push protection plus a required CI secret-scan check. Hooks are convenience, not enforcement.
More on SAST, SCA and secrets scanning in CI
gitleaks fails the PR on `tests/fixtures/fake_rsa.pem` and `testdata/aws_creds.json`, which only contain dummy valuesBeginnergitleaks passes locally but the CI job reports 40 old leaks nobody touched in this PRIntermediate`fatal: ambiguous argument 'origin/main..HEAD': unknown revision` in the secrets-scan stepBeginnerSemgrep flags `subprocess.run(cmd, shell=True)` in a script where `cmd` is a hard-coded constantBeginnerSemgrep in CI reports findings in `node_modules/`, `vendor/` and minified `dist/*.js`BeginnerSemgrep job takes 35 minutes and gets killed with `exit code 137`Intermediate