Skip to main content

自定义模式

You can extend the capabilities of secret scanning to search for your own patterns. These custom patterns can range from your service API keys to connection strings into cloud resources.

谁可以使用此功能?

Secret scanning alerts for partners runs automatically on public repositories and public npm packages to notify service providers about leaked secrets on GitHub.

Secret scanning alerts for users are available for user-owned public repositories for free. Organizations using GitHub Enterprise Cloud with a license for GitHub Advanced Security can also enable secret scanning alerts for users on their private and internal repositories. Additionally, secret scanning alerts for users are available and in beta on user-owned repositories for GitHub Enterprise Cloud with Enterprise Managed Users. For more information, see "About secret scanning alerts" and "About GitHub Advanced Security."

For information about how you can try GitHub Advanced Security for free, see "Setting up a trial of GitHub Advanced Security."

为机密扫描定义自定义模式

可以通过生成一个或多个正则表达式来定义自己的自定义模式,以扩展 secret scanning 的功能。

管理自定义模式

可以查看、编辑和删除自定义模式,以及为自定义模式启用推送保护。

关于如何使用 AI 生成正则表达式

可以使用 正则表达式生成器 为每个模式生成一个或多个正则表达式,从而定义自己的自定义模式,扩展 secret scanning 的功能。

使用 AI 为自定义模式生成正则表达式

可以使用 正则表达式生成器 为自定义模式生成正则表达式。 生成器使用 AI 模型生成与输入匹配的表达式,并选择性地生成示例字符串。

自定义模式的指标

可以在存储库、组织和企业级别查看自定义模式的警报指标。