Skip to main content

此版本的 GitHub Enterprise Server 将于以下日期停止服务 2026-03-17. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

代码扫描的默认设置会替代高级设置

你应用定义为“Enabled with advanced setup allowed”的 security configuration,在某些仓库中忽略了 code scanning 的现有高级设置。

谁可以使用此功能?

具有管理员角色的组织所有者、安全管理员和组织成员

本文内容

About the problem

When you apply a security configuration and code scanning is defined as "Enabled with advanced setup allowed", each repository is checked to see if there is an existing, active, advanced setup.

  • No change to code scanning if an active advanced setup configuration is detected.
  • Default setup is enabled for repositories where advanced setup is inactive or absent.

Inactive or absent advanced setup

Advanced setup is considered inactive for a repository if the repository meets any of the following criteria:

  • The latest CodeQL analysis is more than 90 days old.
  • All CodeQL configurations have been deleted.
  • The workflow file has been deleted or disabled (exclusively for advanced setup run using actions).

Solving the problem

This solution has two parts:

  1. Any repositories where default setup for code scanning was unexpectedly applied need to run CodeQL analysis at intervals of less than 90 days, for example, once a month.

    Even if the repository is not under active development, new vulnerabilities may be identified by updates to CodeQL analysis.

  2. Once the affected repositories all have CodeQL analysis running, you can reapply the security configuration.