Skip to main content

此版本的 GitHub Enterprise Server 已于以下日期停止服务 2026-03-17. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

为非提供程序模式启用机密扫描

你可以在 存储库级别启用 secret scanning,以检测更多潜在机密。

谁可以使用此功能?

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

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

Enabling scanning for non-provider patterns

注意

The detection of non-provider patterns is currently in beta and subject to change.

You can enable scanning for non-provider patterns. Non-provider patterns correspond to secrets such as private keys.

For more information about non-provider patterns, see "Supported secret scanning patterns."

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the "Security" section of the sidebar, click Code security and analysis.

  4. Under "Secret scanning", to the right of "Non-provider patterns", click Enable.

Further reading