Skip to main content
Skip to 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.

Enabling push protection for AI-detected secrets

Block pushes that contain passwords and other unstructured secrets found using AI.

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.