Skip to main content

Enabling generic secret detection for AI-detected secrets

You can enable 通用机密检测 for your repository or organization. Alerts for generic secrets, such as passwords, are displayed in a separate list on the secret scanning alerts page.

谁可以使用此功能?

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

Enabling 通用机密检测

You can enable 通用机密检测 in the security settings page of your repository or organization.

注意

无需订阅 GitHub Copilot 即可使用 Copilot 机密扫描 的 通用机密检测。 Copilot 机密扫描 功能可用于启用了 GitHub Secret Protection 的组织和企业拥有的存储库。

Enabling 通用机密检测 for your repository

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

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

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

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

  4. Under "Secret Protection", to the right of "Scan for AI-detected secrets", click Enable.

Enabling 通用机密检测 for your organization

You must configure 通用机密检测 for your organization using a custom security configuration. You can then apply the security configuration to all (or selected) repositories in your organization.

  1. Create a new custom security configuration, or edit an existing one. See 删除自定义安全配置.
  2. When creating the custom security configuration, ensure that "Secret Protection" is set to Enabled, and that the dropdown menu for "Scan for AI-detected secrets" is also set to Enabled.
  3. Apply the custom security configuration to one or more repositories. For more information, see 删除自定义安全配置.

For information on how to view alerts for generic secrets that have been detected with AI, see 查看和筛选来自机密扫描的警报.

Further reading