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.

Custom patterns

Detect secret types specific to your organization with custom patterns.

You can define custom patterns to identify secrets that are not detected by the default patterns supported by secret scanning. For example, you might have a secret pattern that is internal to your organization. For a list of supported secrets and service providers, see Supported secret scanning patterns.

Custom patterns for secret scanning are defined as regular expressions, and can be created at the enterprise, organization, or repository level. You can also enable push protection for custom patterns, stopping those secrets from ever reaching your repository.

Next steps

To start using custom patterns, see Defining custom patterns for secret scanning.