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 is available for the following repositories:

  • Public repositories (for free)
  • Private and internal repositories in organizations using GitHub Enterprise Cloud with GitHub Advanced Security enabled
  • User-owned repositories for GitHub Enterprise Cloud with Enterprise Managed Users

用户的推送保护

通过用户的推送保护,你将自动受到跨 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.

Working with push protection from the REST API

Learn your options for unblocking your push to GitHub using the REST API if secret scanning detects a secret in the content of your API request.

使用 GitHub UI 中的推送保护

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