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
-
在 GitHub 上,导航到存储库的主页面。
-
在仓库名称下,单击 “Settings”****。 如果看不到“设置”选项卡,请选择“”下拉菜单,然后单击“设置”。

-
在边栏的“Security”部分中,单击“ Advanced Security”****。
-
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.
- Create a new custom security configuration, or edit an existing one. See 删除自定义安全配置.
- 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.
- 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 查看和筛选来自机密扫描的警报.