# 关于GitHub高级安全性

GitHub为购买GitHub Code Security或GitHub Secret Protection的客户提供附加安全功能。

## 关于 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 中的所有功能。

你必须处于 GitHub Team 或 GitHub Enterprise 计划才能购买 GitHub Code Security 或 GitHub Secret Protection。 有关详细信息，请参阅 [GitHub的计划](/zh/enterprise-server@3.22/get-started/learning-about-github/githubs-plans) 和 [GitHub Advanced Security 许可证计费](/zh/enterprise-server@3.22/billing/concepts/product-billing/github-advanced-security)。

## GitHub Code Security

可使用以下 GitHub Code Security功能：

* **Code scanning**：使用 CodeQL 或第三方工具搜索代码中的潜在安全漏洞和编码错误。

* **CodeQL CLI**：在软件项目上本地运行 CodeQL 进程，或生成 code scanning 结果以上传到 GitHub。

* **自定义自动分类规则 的 Dependabot**：大规模管理你的 Dependabot alerts，通过自动化你希望忽略、暂缓或触发 Dependabot 安全更新的警报。

* **依赖关系评审：** 显示更改对依赖项的完整影响，并在合并拉取请求之前查看全部有漏洞的版本的详细信息。

* 安全概览：了解整个组织的风险分布\*\*\*\*。

有关功能的详细信息，请参阅 [GitHub安全功能](/zh/enterprise-server@3.22/code-security/getting-started/github-security-features)。

## GitHub Secret Protection

可使用以下 GitHub Secret Protection功能：

* **Secret scanning**：检测已签入存储库的机密（例如密钥和令牌），并接收警报。
* **推送保护**：阻止包含机密的提交，防止机密泄漏发生。
* **自定义模式**：检测并防止组织特定的机密泄漏。
* 推送保护的**委派绕过**和**委派警报消除**：实施审批流程，更好地控制企业中谁可以执行敏感操作，并支持大规模治理。
* **安全概览**：了解整个组织的风险分布。

有关各个功能的详细信息，请参阅 [GitHub安全功能](/zh/enterprise-server@3.22/code-security/getting-started/github-security-features)。

## 运行免费安全风险评估

<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 实现机密保护](/zh/enterprise-server@3.22/code-security/concepts/secret-security/secret-security-with-github#secret-risk-assessment)”。

## 部署 GitHub Code Security 和 GitHub Secret Protection

若要从高层面了解规划部署 GitHub Code Security 和 GitHub Secret Protection 时需要掌握的内容，以及查看我们建议的推出阶段，请参阅 [大规模采用 GitHub Advanced Security](/zh/enterprise-server@3.22/code-security/tutorials/adopting-github-advanced-security-at-scale)。

## 启用功能

可以使用一 security configuration系列安全启用设置来大规模启用安全功能，这些设置可应用于组织中的存储库。 您可以使用 Advanced Security 在组织级别自定义 global settings 功能。 请参阅“[大规模启用安全功能](/zh/enterprise-server@3.22/code-security/concepts/security-at-scale/organization-security)”。

如果使用的是 GitHub Team 或 GitHub Enterprise 计划，则整个团队或企业的许可证使用将显示在许可证页上。

## 管理 GitHub Advanced Security

企业所有者可以管理 GitHub Advanced Security 其企业的许可和访问权限，包括在所有存储库中禁用 GitHub Advanced Security 并防止将来重新启用。 请参阅“[禁用企业GitHub高级安全性](/zh/enterprise-server@3.22/billing/how-tos/products/disable-ghas-for-enterprise)”。

有关管理 GitHub Advanced Security 许可证的信息，请参阅 [管理您对Advanced Security的付费使用情况](/zh/enterprise-server@3.22/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/managing-your-github-advanced-security-license-usage)。

## 关于 Azure Repos 的 GitHub Advanced Security

如果要将 <c0 /> 与 Azure Repos 配合使用，请参阅我们资源网站中的 <c2><c1 /> & Azure DevOps</c2>。 有关文档，请参阅 Microsoft Learn 中的 [Configure GitHub Advanced Security for Azure DevOps](https://learn.microsoft.com/en-us/azure/devops/repos/security/configure-github-advanced-security-features)。

## 其他阅读材料

* [GitHub安全功能](/zh/enterprise-server@3.22/code-security/getting-started/github-security-features)
* [
  GitHub 公共路线图](https://github.com/github/roadmap)
* [强制实施企业的代码安全性和分析策略](/zh/enterprise-server@3.22/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-security-and-analysis-for-your-enterprise)