Skip to main content

このバージョンの GitHub Enterprise はこの日付をもって終了となりました: 2022-10-12. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの向上、新機能の向上を図るために、最新バージョンの GitHub Enterprise にアップグレードします。 アップグレードに関するヘルプについては、GitHub Enterprise サポートにお問い合わせく� さい

Viewing code scanning logs

You can view the output generated during code scanning analysis in your GitHub Enterprise Server instance.

Who can use this feature

If you have write permissions to a repository, you can view the code scanning logs for that repository.

Code scanning is available for organization-owned repositories in GitHub Enterprise Server. This feature requires a license for 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. If you want to use GitHub Actions to scan your code, the site administrator must also enable GitHub Actions and set up the infrastructure required. For more information, see "Configuring code scanning for your appliance."

About your code scanning setup

You can use a variety of tools to set up code scanning in your repository. For more information, see "Setting up code scanning for a repository."

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. For more information, see "Managing code scanning alerts for your repository."

About analysis and diagnostic information

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

Analysis information is shown for the most recent analysis in a header at the top of the list of alerts. For more information, see "Managing code scanning alerts for your repository."

Diagnostic information is displayed in the Action workflow logs and consists of summary metrics and extractor diagnostics. For information about accessing code scanning logs on GitHub, see "Viewing the logging output from code scanning" below.

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 you upload to GitHub with the code scanning results.

For information about the CodeQL CLI, see "Configuring CodeQL CLI in your CI system."

About summary metrics

サマリのメトリクスには以下が含まれます。

  • CodeQLデータベースの作成と抽出前のコードベース中のコードの行数(ベースラインとして使われます)
  • 外部ライブラリと自動生成されたファイルを含む、コードから抽出されたCodeQLデータベース中のコードの行数
  • 自動生成されたファイルと外部ライブラリを除く、CodeQLデータベース中のコードの行数

About CodeQL source code extraction diagnostics

抽出診断は分析の間に見られたファイルのみをカバーし、以下のメトリクスを含みます。

  • 分析に成功したファイル数
  • データベースの作成中に抽出エラーを生成したファイル数
  • データベースの作成中に抽出の警告を生成したファイル数

Viewing the logging output from code scanning

This section applies to code scanning run using GitHub Actions (CodeQL or third-party).

After setting up code scanning for your repository, you can watch the output of the actions as they run.

  1. リポジトリ名の下の [Actions] (アクション) をクリックします。 メインのリポジトリ ナビゲーション内の [Actions](アクション) タブ

    You'll see a list that includes an entry for running the code scanning workflow. The text of the entry is the title you gave your commit message.

    Actions list showing code scanning workflow

  2. Click the entry for the code scanning workflow.

  3. Click the job name on the left. For example, Analyze (LANGUAGE).

    Log output from the code scanning workflow

  4. Review the logging output from the actions in this workflow as they run.

  5. Once all jobs are complete, you can view the details of any code scanning alerts that were identified. For more information, see "Managing code scanning alerts for your repository."

Note: If you raised a pull request to add the code scanning workflow to the repository, alerts from that pull request aren't displayed directly on the Code scanning page until the pull request is merged. If any alerts were found you can view these, before the pull request is merged, by clicking the n alerts found link in the banner on the Code scanning page.

Click the "n alerts found" link