简介
本指南向您展示如何配置一个组织的安全功能。 组织的安全需求是独一无二的,您可能不需要启用每个安全功能。 更多信息请参阅“GitHub 安全功能”。
某些安全功能仅适用于公共仓库,以及由 Advanced Security 许可的组织拥有的仓库。 更多信息请参阅“关于 GitHub Advanced Security”。
管理对组织的访问
You can use roles to control what actions people can take in your organization. For example, you can assign the security manager role to a team to give them the ability to manage security settings across your organization, as well as read access to all repositories. For more information, see "Roles in an organization."
创建默认安全策略
您可以创建默认安全策略,该策略将显示在组织中任何没有自己的安全策略的公共仓库中。 更多信息请参阅“创建默认社区健康文件”。
管理 Dependabot 警报 和依赖关系图
默认情况下,GitHub 会检测公共仓库中的漏洞,并生成 Dependabot 警报 和依赖关系图。 您可以为组织拥有的所有私有仓库启用或禁用 Dependabot 警报 和依赖关系图。
- 单击您的个人资料照片,然后单击 Organizations(组织)。
- 单击组织旁边的 Settings(设置) 。
- 点击 Security & analysis(安全和分析)。
- 单击您要管理的功能旁边的 Enable all(全部启用)或 Disable all(全部禁用)。
- (可选)选择 Automatically enable for new repositories(自动对新仓库启用)。
更多信息请参阅“关于漏洞依赖项的警报”、“探索仓库的依赖关系”和“管理组织的安全和分析设置”。
管理依赖项审查
依赖项审查可让您在合并到仓库之前在拉取请求中显示依赖关系的变化。 依赖项审查在所有公共仓库中可用。 For private and internal repositories you require a license for Advanced Security. To enable dependency review for an organization, enable the dependency graph and enable Advanced Security.
更多信息请参阅“关于依赖项审查”。
管理 Dependabot 安全更新
对于任何使用 Dependabot 警报 的仓库,您可以启用 Dependabot 安全更新 在检测到漏洞时提出带有安全更新的拉取请求。 您也可以为组织的所有仓库启用或禁用 Dependabot 安全更新。
- 单击您的个人资料照片,然后单击 Organizations(组织)。
- 单击组织旁边的 Settings(设置) 。
- 点击 Security & analysis(安全和分析)。
- 单击 Dependabot 安全更新 旁边的 Enable all(全部启用)或 Disable all(全部禁用)。
- (可选)选择 Automatically enable for new repositories(自动对新仓库启用)。
更多信息请参阅“关于 Dependabot 安全更新”和“管理组织的安全性和分析设置”。
管理 Dependabot 版本更新
您可以让 Dependabot 自动提出拉取请求以保持依赖项的更新。 更多信息请参阅“关于 Dependabot 版本更新“。
要启用 Dependabot 版本更新,您必须创建 dependabot.yml 配置文件。 For more information, see "Enabling and disabling Dependabot version updates."
管理 GitHub Advanced Security
如果您的组织属于具有 Advanced Security 许可的企业,您可以启用或禁用 Advanced Security 功能。
- 单击您的个人资料照片,然后单击 Organizations(组织)。
- 单击组织旁边的 Settings(设置) 。
- 点击 Security & analysis(安全和分析)。
- 单击 GitHub Advanced Security 旁边的 Enable all(全部启用)或 Disable all(全部禁用)。
- (可选)选择 Automatically enable for new private repositories(自动对新私有仓库启用)。
更多信息请参阅“关于 GitHub Advanced Security”和“管理组织的安全性和分析设置”。
配置 秘密扫描
秘密扫描 可用于公共仓库,以及具有 Advanced Security 许可的组织拥有的私有仓库。
您可以对已启用 Advanced Security 的所有仓库启用或禁用 秘密扫描。
- 单击您的个人资料照片,然后单击 Organizations(组织)。
- 单击组织旁边的 Settings(设置) 。
- 点击 Security & analysis(安全和分析)。
- 单击 秘密扫描 旁边的 Enable all(全部启用)或 Disable all(全部禁用)(仅限 GitHub Advanced Security 仓库)。
- (可选)选择自动对添加到 Advanced Security 的私有仓库启用。
更多信息请参阅“管理组织的安全和分析设置”。
后续步骤
You can view, filter, and sort security alerts for repositories owned by your organization in the security overview. For more information, see "About the security overview."
您可以查看和管理来自安全功能的警报,以解决代码中的依赖项和漏洞。 For more information, see "Viewing and updating vulnerable dependencies in your repository," "Managing pull requests for dependency updates," "Managing 代码扫描 for your repository," and "Managing alerts from 秘密扫描."
If you have a security vulnerability, you can create a security advisory to privately discuss and fix the vulnerability. 更多信息请参阅“关于 GitHub Security Advisories”和“创建安全通告”。

