# How-tos for customizing secret leak detection

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

## Links

* [Defining custom patterns for secret scanning](/en/enterprise-server@3.18/code-security/how-tos/secure-your-secrets/customize-leak-detection/define-custom-patterns)

  Protect your unique secret types by defining custom patterns with regular expressions.

* [/generating-regular-expressions-for-custom-patterns-with-ai](/en/enterprise-server@3.18/generating-regular-expressions-for-custom-patterns-with-ai)

* [Managing custom patterns](/en/enterprise-server@3.18/code-security/how-tos/secure-your-secrets/customize-leak-detection/manage-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](/en/enterprise-server@3.18/code-security/how-tos/secure-your-secrets/customize-leak-detection/exclude-folders-and-files)

  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.

* [/enable-validity-checks](/en/enterprise-server@3.18/enable-validity-checks)

* [/enable-metadata-checks](/en/enterprise-server@3.18/enable-metadata-checks)