Skip to main content

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

Code scanning logs

You can view the output generated during code scanning analysis in GitHub.

本文内容

The log and diagnostic information available to you depends on the method you use for code scanning in your repository. You can check the type of code scanning you're using in the Security tab of your repository, by using the Tool drop-down menu in the alert list. To access this page, see 评估存储库的代码扫描警报.

Logs on GitHub

You can see analysis and diagnostic information for code scanning run using CodeQL analysis on GitHub.

Summary metrics

摘要指标包括:

  • 在创建和提取 CodeQL 数据库之前,代码库中的代码行(用作基线)
  • 从代码中提取的 CodeQL 数据库中的代码行,包括外部库和自动生成的文件
  • CodeQL 数据库中的代码行,不包括自动生成的文件和外部库

Source code extraction diagnostics

提取器诊断仅涵盖分析期间看到的文件,指标包括:

  • 成功分析的文件数量
  • 在创建数据库过程中生成提取器错误的文件数量
  • 在创建数据库过程中生成提取器警告的文件数量

You can see more detailed information about CodeQL extractor errors and warnings that occurred during database creation by enabling debug logging. See 日志不够详细.

Logs for the CodeQL CLI

If you're using the CodeQL CLI outside GitHub, you'll see diagnostic information in the output generated during database analysis. This information is also included in the SARIF results file.

Logs in VS Code

Progress and error messages are displayed as notifications in the bottom right corner of the Visual Studio Code workspace. These link to more detailed logs and error messages in the "Output" window.

You can access separate logs for the CodeQL extension, language server, query Server, or tests. The Language Server log contains more advanced debug logs for CodeQL language maintainers. You should only need these to provide details in a bug report.

To access these logs, see Accessing logs for CodeQL in Visual Studio Code.