Push protection blocks known token formats before they land in a repository, and scanners such as Gitleaks and TruffleHog search history, files, and other sources. Agent generated commits and logs deserve the same scanning as human ones. Act on findings fast, since leaked tokens are often abused within minutes.
Read in this order
- OfficialGitHub: Secret scanningStart here: what secret scanning detects and how alerts reach your team.
- Open sourceTruffleHogScan history and other sources, and check whether a found secret is still live.
- Open sourceGitleaksA fast scanner for pre-commit hooks and CI runs on agent commits.