Skip to main content

关于GitHub高级安全性

          GitHub为购买或GitHub Code SecurityGitHub Secret Protection使用提供额外的安全功能。 默认情况下,某些功能为公共存储库启用。

谁可以使用此功能?

GitHub Code Security 和 GitHub Secret Protection 可用于 GitHub Team 上的帐户和 GitHub Enterprise Cloud。

某些功能也可免费用于 GitHub.com 上的公共存储库。有关详细信息,请参阅 GitHub的计划

有关 GitHub Advanced Security for Azure DevOps 的信息,请参阅 Microsoft Learn 中的配置 GitHub Advanced Security for Azure DevOps

关于 GitHub Advanced Security产品

          GitHub 有许多功能可帮助你改进和维护代码的质量。 其中一些包含在所有计划中,例如依赖项关系图和 Dependabot alerts。

其他安全功能要求购买GitHub的其中一种Advanced Security产品:

  • GitHub Secret Protection,包括可帮助你检测和防止机密泄露的功能,例如 secret scanning 和推送保护。
  • GitHub Code Security,包括有助于查找和修复漏洞的功能,例如 code scanning、高级 Dependabot 功能和依赖项评审。

或者,你可以拥有 GitHub Advanced Security 许可证,其中包括 GitHub Secret Protection 和 GitHub Code Security 中的所有功能。

          默认情况下,某些功能(例如 code scanning 和 secret scanning)为公共存储库启用。 若要在专用或内部存储库上运行该功能,必须购买相关 GitHub Advanced Security 产品。

您必须处于GitHub Team计划或GitHub Enterprise计划才能购买GitHub Code Security或GitHub Secret Protection。 有关详细信息,请参阅 GitHub的计划GitHub Advanced Security 许可证计费

GitHub Code Security

可使用以下 GitHub Code Security功能:

  •         **
            Code scanning
            **:使用 CodeQL 或第三方工具搜索代码中的潜在安全漏洞和编码错误。
    
  •         **
            CodeQL CLI
            **
            CodeQL:在本地运行进程于软件项目上,或生成code scanning,以便将结果上传到GitHub。
    
  •         **
            Copilot 自动修复
            **:获取警报 code scanning 的自动生成的修补程序。
    
  •         **安全活动**:大规模减少安全债务。
    
  •         **
            自定义自动分类规则 for Dependabot**:大规模管理Dependabot alerts,自动化处理需要忽略、推迟或触发Dependabot安全更新的警报。
    
  •         **依赖关系评审:** 显示更改对依赖项的完整影响,并在合并拉取请求之前查看全部有漏洞的版本的详细信息。
    
  • 安全概览:了解整个组织的风险分布****。

下表汇总了公共和专用存储库的功能可用性 GitHub Code Security 。

公共存储库
没有 GitHub Code Security
专用存储库
没有 GitHub Code Security
公共或专用存储库
跟 GitHub Code Security
Code scanning
CodeQL CLI
Copilot 自动修复
安全活动
自定义自动分类规则
依赖项审查
安全概述

有关功能的详细信息,请参阅 GitHub安全功能

GitHub Secret Protection

可使用以下 GitHub Secret Protection功能:

  •           **Secret scanning**:检测已签入仓库的机密,例如密钥和令牌,并接收警报。
    
  •           **推送保护**:阻止包含机密的提交,防止发生机密泄漏。
    
  •           **Copilot 机密扫描**:利用 AI 检测已签入仓库的非结构化凭据(如密码)。
    
  •           **自定义模式**:检测和防止组织特定的机密泄漏。
    
  •           **推送保护委派绕过**和**委派警报解除**:实施审批流程,以便更好地控制企业中谁可以执行敏感操作,支持大规模治理。
    
  •           **安全活动**:通过创建活动并协作修复,大规模修正公开的机密。
    
  •           **安全概览**:了解整个组织的风险分布。
    

下表汇总了公共和专用存储库的功能可用性 GitHub Secret Protection 。

公共存储库
没有 GitHub Secret Protection
专用存储库
没有 GitHub Secret Protection
公共或专用存储库
跟 GitHub Secret Protection
机密扫描
推送保护
Copilot 机密扫描
自定义模式
推送保护委派绕过
安全活动
安全概述

有关各个功能的详细信息,请参阅 GitHub安全功能

运行免费安全风险评估

          <a href="https://github.com/get_started?with=risk-assessment&ref_product=code-scanning&ref_type=engagement&ref_style=button" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline">
          <span>安全风险评估入门</span><svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-link-external" aria-label="link external icon" role="img"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a>

          GitHub Team
          GitHub Enterprise组织可以运行免费的安全风险评估,以了解其暴露在安全漏洞方面的风险:

* 机密泄漏:扫描组织中的泄露机密,查看有多少可能通过GitHub Secret Protection得以防止。 请参阅“关于使用 GitHub 的机密安全性”。

  •         **代码漏洞**:扫描最多 20 个最活跃的存储库,并在启用Copilot 自动修复时查看可自动修复GitHub Code Security的漏洞数。 请参阅“[AUTOTITLE](/code-security/concepts/code-scanning/code-security-risk-assessment)”。
    

在企业中部署 GitHub Code Security 和 GitHub Secret Protection

若要了解您在计划高层次部署GitHub Code Security和GitHub Secret Protection所需的知识,及查看我们建议的部署阶段,请参阅 大规模采用 GitHub Advanced Security

启用功能

可以使用 security configuration大规模启用安全功能,这是可应用于组织中的存储库的安全启用设置集合。 可以在组织级别使用 global settings 自定义 Advanced Security 的功能。 请参阅“关于批量启用安全功能”。

如果使用的是 GitHub Team 或 GitHub Enterprise 计划,则整个团队或企业的许可证使用将显示在许可证页上。 请参阅 查看按流量计费的产品和许可证的使用情况

管理 GitHub Advanced Security

企业所有者可以管理 GitHub Advanced Security 其企业的许可和访问权限,包括在所有存储库中禁用 GitHub Advanced Security 并防止将来重新启用。 请参阅“管理GitHub高级安全性的批量许可证”。

有关管理 GitHub Advanced Security 许可证的信息,请参阅 管理 Advanced Security 的付费使用情况

利用 GitHub Copilot 对话助手 了解安全警报

此外,借助GitHub Copilot Enterprise许可证,可以请求GitHub Copilot 对话助手帮助更好地了解组织中存储库中的安全警报(code scanningsecret scanning和Dependabot alerts)。 请参阅“在GitHub中提问关于GitHub Copilot的问题”。

关于 GitHub Advanced Security 认证

可以通过获取GitHub Advanced SecurityGitHub Certifications证书来展示你的知识。 该认证可检验你在漏洞识别、工作流安全性和可靠的安全实现方面的专业知识。 请参阅“关于 GitHub Certifications”。

关于 Azure Repos 的 GitHub Advanced Security

如果要将 与 Azure Repos 配合使用,请参阅我们资源网站中的 & Azure DevOps。 有关文档,请参阅 Microsoft Learn 中的 Configure GitHub Advanced Security for Azure DevOps

其他阅读材料

  •         [AUTOTITLE](/code-security/getting-started/github-security-features)
    
  •         [
            GitHub 公共路线图](https://github.com/github/roadmap)
    
  •         [AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-security-and-analysis-for-your-enterprise)