Skip to main content

About CodeQL code scanning in your CI system

You can analyze your code with CodeQL in a third-party continuous integration system and upload the results to your GitHub Enterprise Server instance. The resulting code scanning alerts are shown alongside any alerts generated within GitHub Enterprise Server.

Code scanning 可用于 GitHub Enterprise Server 中的组织拥有的存储库。 此功能需要 GitHub Advanced Security 的许可证。 有关详细信息,请参阅“关于 GitHub Advanced Security”。

Note: Your site administrator must enable code scanning for your GitHub Enterprise Server instance before you can use this feature. For more information, see "Configuring code scanning for your appliance."

About CodeQL code scanning in your CI system

Code scanning 是一项功能,可用于分析 GitHub 仓库中的代码,以查找安全漏洞和编码错误。 分析发现的任何问题都显示在 GitHub Enterprise Server 中。 For information, see "About code scanning with CodeQL."

You can run CodeQL code scanning within GitHub Enterprise Server using GitHub Actions. Alternatively, if you use a third-party continuous integration or continuous delivery/deployment (CI/CD) system, you can run CodeQL analysis in your existing system and upload the results to your GitHub Enterprise Server instance.

将 CodeQL CLI 添加到第三方系统,然后调用工具分析代码并将 SARIF 结果上传到 GitHub Enterprise Server。 由此产生的 code scanning 警报与 GitHub Enterprise Server 内生成的任何警报一起显示。 有关详细信息,请参阅“关于 CI 系统中的 CodeQL 代码扫描”。

注意:上传 SARIF 数据以显示为 GitHub Enterprise Server 中的 code scanning 结果适用于启用了 GitHub Advanced Security 的组织拥有的数据库 。 有关详细信息,请参阅“管理存储库库的安全和分析设置”。

About the CodeQL CLI

The CodeQL CLI is a standalone product that you can use to analyze code. Its main purpose is to generate a database representation of a codebase, a CodeQL database. Once the database is ready, you can query it interactively, or run a suite of queries to generate a set of results in SARIF format and upload the results to your GitHub Enterprise Server instance.

Use the CodeQL CLI to analyze:

  • Dynamic languages, for example, JavaScript and Python.
  • Compiled languages, for example, C/C++, C#, and Java.
  • Codebases written in a mixture of languages.

For more information, see "Installing CodeQL CLI in your CI system."

Notes:

  • The CodeQL CLI is available to customers with an Advanced Security license.

  • CodeQL CLI 当前与非 glibc Linux 发行版不兼容,例如(基于 musl 的)Alpine Linux。