# コード スキャンとの統合

code scanningを外部で実行し、結果をGitHubで表示したり、リポジトリ内のcode scanningアクティビティをリッスンする Webhook を構成したりできます。

## Code scanningとのインテグレーションについて

> \[!NOTE]
> この機能を使用するには、サイト管理者が code scanning を有効にする必要があります。 詳しくは、「[アプライアンスのコード スキャンの構成](/ja/enterprise-server@3.18/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-code-scanning-for-your-appliance)」をご覧ください。
>
> Enterprise の所有者が Enterprise レベルで code scanning ポリシーを設定している場合、GitHub Code Security を有効または無効にできない場合があります。 詳しくは、「[エンタープライズのコード セキュリティと分析のためのポリシーの適用](/ja/enterprise-server@3.18/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-security-and-analysis-for-your-enterprise)」をご覧ください。

code scanning内でGitHubを実行する代わりに、CodeQL CLI または別の静的分析ツールを使用して他の場所で分析を実行し、結果をアップロードできます。 詳細については、「[既存の CI システムでコード スキャンを使用する](/ja/enterprise-server@3.18/code-security/code-scanning/integrating-with-code-scanning/using-code-scanning-with-your-existing-ci-system)」を参照してください。

複数の構成を使用してコード スキャンを実行すると、アラートに複数の分析元が含まれることがあります。 アラートに複数の分析元がある場合、各分析元でのアラートの状態を、\[アラート] ページに表示することができます。 詳しくは、「[コード スキャンのアラート](/ja/enterprise-server@3.18/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-analysis-origins)」をご覧ください。

## webhook とのインテグレーション

code scanning Webhook を使用して、リポジトリ内のGitHub Apps イベントをサブスクライブする統合 (OAuth appsやcode scanningなど) を構築または構成できます。 たとえば、 GitHub で問題を作成したり、リポジトリに新しい code scanning アラートが追加されたときに Slack 通知を送信したりする統合を構築できます。 詳細については、「[Webhook ドキュメント](/ja/enterprise-server@3.18/webhooks)」および「[Webhook のイベントとペイロード](/ja/enterprise-server@3.18/webhooks-and-events/webhooks/webhook-events-and-payloads#code_scanning_alert)」を参照してください。

## 詳細については、次を参照してください。

* [Code scanning](/ja/enterprise-server@3.18/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning)
* [既存の CI システムでコード スキャンを使用する](/ja/enterprise-server@3.18/code-security/code-scanning/integrating-with-code-scanning/using-code-scanning-with-your-existing-ci-system)
* [Code scanningの SARIF サポート](/ja/enterprise-server@3.18/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning)