secret scanning

Searching code, commits and files for credentials such as keys and tokens, ideally before they are committed.

A committed secret can be copied by anyone with repository access and used until it is revoked.

In more detail

Scanners combine patterns for known token formats with an entropy check for randomness. Scan in a pre-commit hook and again in CI, because hooks are not cloned and can be skipped.

Example

In this course: Run it in the gate so a leaked secret is caught before merge; any secret that did reach a repository must be revoked, not just deleted. GitHub and tools such as Gitleaks provide it.

Related terms

Taught in

References

Certification courses