Skip to main content

Working with secret scanning and push protection

Avoid leaking sensitive data by blocking pushes containing tokens and other secrets.

Who can use this feature?

Secret scanning is available for the following repository types:

Working with push protection from the command line

Learn your options for unblocking your push from the command line to GitHub if secret scanning detects a secret in your changes.

Working with push protection from the REST API

Learn your options for unblocking your push to GitHub using the REST API if secret scanning detects a secret in the content of your API request.

Working with push protection in the GitHub UI

Learn your options for unblocking your commit when secret scanning detects a secret in your changes.