Skip to main content

启用机密扫描功能

了解如何启用 secret scanning 来检测存储库中已显示的机密,以及如何通过阻止包含机密的推送来主动防止泄露其他机密的推送保护。

谁可以使用此功能?

Secret scanning is available for organization-owned repositories, and in beta for user-owned repositories in GitHub Enterprise Server if your enterprise has a license for GitHub Advanced Security. For more information, see "About secret scanning alerts" and "About GitHub Advanced Security."

为存储库启用机密扫描

可以配置 GitHub 如何扫描存储库中遭到泄露的机密并生成警报。

为存储库启用推送保护

通过推送保护,secret scanning 会阻止参与者将机密推送到存储库,并在参与者绕过该阻止时生成警报。