Skip to main content

此版本的 GitHub Enterprise Server 将于以下日期停止服务 2026-08-25. 已停止发布的版本不受支持。 即使针对重大安全问题,也不会发布补丁。 若要获得更好的性能、改进的安全性和 GitHub Enterprise Server 中的新功能,请参阅升级过程的 Overview。 如需升级帮助,请联系 GitHub Enterprise 支持。

Enabling secret scanning for generic patterns

You can enable secret scanning to detect additional potential secrets at the repository and organization levels.

谁可以使用此功能?

具有管理员角色的存储库所有者、组织所有者、安全管理员和用户

非提供者模式扫描可用于以下存储库类型:

Enabling scanning for generic patterns

You can enable scanning for generic patterns. Generic patterns correspond to secrets such as private keys.

For more information about generic patterns, see "支持的机密扫描模式."

Enabling detection of generic patterns for a repository

  1. 在 GitHub 上,导航到存储库的主页面。

  2. 在仓库名称下,单击 “Settings”****。 如果看不到“设置”选项卡,请选择“”下拉菜单,然后单击“设置”。

    存储库标头的屏幕截图,其中显示了选项卡。 “设置”选项卡以深橙色边框突出显示。

  3. 在边栏的“Security”部分中,单击“ Advanced Security”****。

  4. Under "Secret Protection", to the right of "Generic patterns", click Enable.

Enabling detection of generic patterns for an organization

You can enable scanning for generic patterns at the organization level by applying a custom security configuration. For more information, see 删除自定义安全配置.