Skip to main content

Enabling secret scanning for generic patterns

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

谁可以使用此功能?

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

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

  • 启用了 GitHub Team 的 GitHub Secret Protection 上的组织拥有的存储库

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 删除自定义安全配置.