How-tos for leak prevention - GitHub Docs
Skip to main content

How-tos for leak prevention

Prevent exposed secrets from reaching your repositories and protected branches.

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.

Managing push protection for users

You can control GitHub's ability to block your pushes that may contain secrets.

Blocking pull request merges that contain secrets

Prevent exposed secrets from reaching protected branches by requiring contributors to resolve secret scanning alerts before merging.