Skip to main content

This version of GitHub Enterprise Server will be discontinued on 2026-03-17. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

How-tos for customizing secret leak detection

Learn how to customize GitHub's secret leak detection tools.

Defining custom patterns for secret scanning

You can define your own custom patterns to extend the capabilities of secret scanning by generating one or more regular expressions.

Managing custom patterns

You can view, edit, and remove custom patterns, as well as enable push protection for custom patterns.

Excluding folders and files from secret scanning

You can customize secret scanning to automatically close alerts for secrets found in specific directories or files by configuring a secret_scanning.yml file in your repository.