Security in the pipeline, topic 29 of 70
Secret scanning
Secrets leak into Git all the time, and once pushed they stay in the history. Scan before the push, with a pre-commit hook such as gitleaks, and on the server, with your Git host's push protection.
When one leaks, deleting the commit is not enough: revoke and rotate the secret at once, then check its logs for use. Assume a public leak is found by bots within minutes.
On Opsfolk
Nothing of ours for this topic yet: an article is on its way.
Elsewhere
- About secret scanning, GitHubOfficial
- GitleaksOfficial