注:组织拥有的公共和私有仓库的 秘密扫描 目前处于测试阶段,可能会更改。
关于 秘密扫描
If someone checks a secret from a GitHub partner into a repository on GitHub Enterprise Server, 秘密扫描 catches the secret as it's checked in, and helps you mitigate the impact of the leak. Repository administrators are notified about any commit that contains a secret, and they can quickly view all detected secrets in the Security tab for the repository. For more information, see "About secret scanning."
基本要求
To use 秘密扫描 in 您的 GitHub Enterprise Server 实例 you need these two prerequisites.
-
The SSSE3 (Supplemental Streaming SIMD Extensions 3) CPU flag needs to be enabled on the VM/KVM that runs 您的 GitHub Enterprise Server 实例.
-
You need an Advanced Security license.
Checking support for the SSSE3 flag on your vCPUs
The SSSE3 set of instructions is required because 秘密扫描 leverages hardware accelerated pattern matching to find potential credentials committed to your GitHub repositories. SSSE3 is enabled for most modern CPUs. You can check whether SSSE3 is enabled for the vCPUs available to your GitHub Enterprise Server instance.
- Connect to the administrative shell for your GitHub Enterprise Server instance. 更多信息请参阅“访问管理 shell (SSH)。”
- Enter the following command:
grep -iE '^flags.*ssse3' /proc/cpuinfo >/dev/null | echo $?
If this returns the value 0
, it means that the SSSE3 flag is available and enabled. You can now enable 秘密扫描 for 您的 GitHub Enterprise Server 实例. For more information, see "Enabling secret scanning" below.
If this doesn't return 0
, SSSE3 is not enabled on your VM/KVM. You need to refer to the documentation of the hardware/hypervisor on how to enable the flag, or make it available to guest VMs.
Checking whether you have an Advanced Security license
- 从 GitHub Enterprise Server 上的管理帐户,点击任何页面右上角的 。
- 在左侧边栏中,单击 管理控制台。
- 检查左侧边栏中是否有 Advanced Security 条目。
If you can't see Advanced Security in the sidebar, it means that your license doesn't include support for Advanced Security features, including 代码扫描 and 秘密扫描. Advanced Security 的许可使您和您的用户能够访问那些有助于提高仓库和代码安全性的功能。 For more information, see "About GitHub Advanced Security" or contact GitHub' 销售团队.
启用 秘密扫描
警告:更改此设置将导致 GitHub Enterprise Server 重启。 您应谨慎安排更改时间,以尽量减少停机时间。
- 从 GitHub Enterprise Server 上的管理帐户,点击任何页面右上角的 。
- 在左侧边栏中,单击 管理控制台。
- 在左侧边栏中,单击 Advanced Security。
- 在“
Advanced Security”下,单击 秘密扫描。
- 在左侧边栏下,单击 Save settings(保存设置)。
- 等待配置运行完毕。
禁用 秘密扫描
警告:更改此设置将导致 GitHub Enterprise Server 重启。 您应谨慎安排更改时间,以尽量减少停机时间。
- 从 GitHub Enterprise Server 上的管理帐户,点击任何页面右上角的 。
- 在左侧边栏中,单击 管理控制台。
- 在左侧边栏中,单击 Advanced Security。
- 在“
Advanced Security”下,取消选择 秘密扫描。
- 在左侧边栏下,单击 Save settings(保存设置)。
- 等待配置运行完毕。