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 您的 GitHub Enterprise Server 实例. The resulting 代码扫描 alerts are shown alongside any alerts generated within GitHub Enterprise Server.

代码扫描 适用于启用了 GitHub Advanced Security 的组织拥有的仓库。 更多信息请参阅“关于 GitHub Advanced Security”。

Note: Your site administrator must enable 代码扫描 for 您的 GitHub Enterprise Server 实例 before you can use this feature. For more information, see "Configuring 代码扫描 for your appliance."

About CodeQL 代码扫描 in your CI system

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

You can run CodeQL 代码扫描 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 您的 GitHub Enterprise Server 实例.

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

Note: Uploading SARIF data to display as 代码扫描 results in GitHub Enterprise Server is supported for organization-owned repositories with GitHub Advanced Security enabled. For more information, see "Managing security and analysis settings for your repository."

About the CodeQL CLI

CodeQL CLI 是一个可用来分析代码的独立产品。 其主要用途是生成代码空间的数据库表示形式,即 CodeQL 数据库。 数据库准备就绪后,您可以进行交互式查询,或者运行一系列查询以生成一组 SARIF 格式的结果,然后将结果上传到 您的 GitHub Enterprise Server 实例。

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."

注意: CodeQL CLI 可用于拥有 Advanced Security 许可证的客户。