Skip to main content

How-tos for leak prevention

Learn how to prevent future secret leaks with GitHub's tools.

Enabling push protection for your repository

With push protection, secret scanning blocks contributors from pushing secrets to a repository and generates an alert whenever a contributor bypasses the block.

Push protection for users

With push protection for users, you are automatically protected on all pushes to public repositories across GitHub.