メモ
この機能を使用するには、サイト管理者が code scanning を有効にする必要があります。 詳しくは、「アプライアンス用コードスキャンの構成」をご覧ください。
Enterprise の所有者が Enterprise レベルで GitHub Code Security ポリシーを設定している場合、code scanning を有効または無効にできない場合があります。 詳しくは、「エンタープライズのコード セキュリティと分析のためのポリシーの適用」をご覧ください。
Code scanning は、GitHub リポジトリ内のコードを分析して、セキュリティの脆弱性とコーディング エラーを見つけることができる機能です。 分析によって特定された問題は、リポジトリに表示されます。
You can use code scanning to find, triage, and prioritize fixes for existing problems in your code. Code scanning also prevents developers from introducing new problems. You can schedule scans for specific days and times, or trigger scans when a specific event occurs in the repository, such as a push.
If code scanning finds a potential vulnerability or error in your code, GitHub displays an alert in the repository. After you fix the code that triggered the alert, GitHub closes the alert. For more information, see コード スキャン アラートを解決する.
To monitor results from code scanning across your repositories or your organization, you can use webhooks and the code scanning API. For information about the webhooks for code scanning, see Webhook のイベントとペイロード. For information about API endpoints, see コード スキャン用の REST API エンドポイント.
To get started with code scanning, see コード スキャンの既定セットアップの構成.
About tools for code scanning
You can configure code scanning to use the CodeQL product maintained by GitHub or a third-party code scanning tool.
About CodeQL analysis
CodeQL は、セキュリティ チェックを自動化するために GitHub が開発した、コード分析エンジンです。 CodeQL を使用してコードを分析し、結果を code scanning アラートとして表示することができます。 For more information about CodeQL, see About code scanning with CodeQL.
About third-party code scanning tools
Code scanning は、SARIF (Static Analysis Results Interchange Format) データを出力するサードパーティのコード スキャンニング ツールと相互運用できます。 SARIFはオープン標準です。 詳しくは、「Code scanningの SARIF サポート」をご覧ください。
You can run third-party analysis tools within GitHub using actions or within an external CI system. For more information, see コード スキャンの高度なセットアップの構成 or SARIF ファイルを GitHub にアップロードする.
About the ツールの状態ページ
The ツールの状態ページ shows useful information about all of your code scanning tools. If code scanning is not working as you'd expect, the ツールの状態ページ is a good starting point for debugging problems. For more information, see コード スキャンのツール状態ページについて.