How to stop secret leaks: scan in the pipeline and block the merge
Once a secret is in Git, deleting the line in the current file leaves it in the old commit. In AngusSecurity, Secret scanning blocks the merge, you revoke the secret first, and then you decide whether history needs its own scan.