Skip to main content

使用机密扫描和推送保护

Secret scanning scans for and detects secrets that have been checked into a repository. Push protection proactively secures you against leaking secrets by blocking pushes containing secrets.

谁可以使用此功能?

Secret scanning alerts for partners runs automatically on public repositories and public npm packages to notify service providers about leaked secrets on GitHub.

Secret scanning alerts for users are available for user-owned public repositories for free. Organizations using GitHub Enterprise Cloud with a license for GitHub Advanced Security can also enable secret scanning alerts for users on their private and internal repositories. Additionally, secret scanning alerts for users are available and in beta on user-owned repositories for GitHub Enterprise Cloud with Enterprise Managed Users. For more information, see "About secret scanning alerts" and "About GitHub Advanced Security."

For information about how you can try GitHub Advanced Security for free, see "Setting up a trial of GitHub Advanced Security."

用户的推送保护

通过用户的推送保护,你将自动受到跨 GitHub Enterprise Cloud 向公共存储库的所有推送的保护。

从命令行使用推送保护

Secret scanning scans for and detects secrets that have been checked into a repository. Push protection proactively secures you against leaking secrets by blocking pushes containing secrets.

使用 GitHub UI 中的推送保护

了解 secret scanning 在更改中检测到机密时取消阻止提交的选项。