Interview Prep/DevSecOps/SAST, SCA and secrets scanning in CI

GitHub push protection blocks a push: `GH013: Repository rule violations found ... Push cannot contain secrets` for a revoked key

BeginnerTroubleshootingSAST, SCA and secrets scanning in CI
Answer

Likely causes → Push protection pattern-matches known provider token formats; it does not know the key is revoked.

Diagnose → The push output links to the blocked secret and commit SHA.

Fix → Remove the secret from the commits (git rebase -i, amend, push again). Only use the "allow secret" link if it is truly a test value and justify it; bypasses are audited.

Prevent → Keep tokens out of code entirely; load from env or a secrets manager even in tests.

All DevSecOps questions Roadmap: Security in the pipeline

More on SAST, SCA and secrets scanning in CI