# 依存関係グラフ

依存関係グラフを使って、プロジェクトの依存関係をすべて特定できます。 依存関係グラフは、幅広く一般的なパッケージエコシステムをサポートします。

<!--Marketing-LINK: From /features/security and /features/security/software-supply-chain pages "How GitHub's dependency graph is generated".-->

## 依存関係グラフについて

依存関係グラフは、リポジトリに格納されているマニフェストおよびロック ファイル、および 依存関係送信 API を使用してリポジトリに送信された依存関係の概要です。 それぞれのリポジトリについて、以下が表示されます:の依存関係、すなわちリポジトリが依存するエコシステムとパッケージ。

依存関係ごとに、バージョン、それを含むマニフェスト ファイル、既知の脆弱性があるかどうかを確認できます。 推移的な依存関係をサポートするパッケージ エコシステムの場合、リレーションシップの状態が表示され、\[<svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-kebab-horizontal" aria-label="Show dependency options" role="img"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg>] をクリックしてから \[Show paths] をクリックすると、その依存関係の基になっている推移パスを確認できます。

検索バーを使用して、特定の依存関係を検索することもできます。 依存関係は、脆弱なパッケージが先頭になるように自動的に並べ替えられます。

GitHub では、依存関係のライセンス情報は取得されず、あるリポジトリに依存する依存物、リポジトリ、パッケージに関する情報は計算されません。

サポートされているエコシステムとマニフェスト ファイルの詳細については、[「AUTOTITLE」](/ja/enterprise-server@3.18/code-security/supply-chain-security/understanding-your-software-supply-chain/dependency-graph-supported-package-ecosystems#supported-package-ecosystems)を参照してください。

既定のブランチを対象とする依存関係への変更を含むプル要求を作成すると、 GitHub は依存関係グラフを使用して依存関係レビューをプル要求に追加します。 それらは、依存関係が脆弱性を含んでいるか、もしそうならその脆弱性が修復されているバージョンを示しています。 詳細については、「[依存関係の確認](/ja/enterprise-server@3.18/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)」を参照してください。

## 依存関係グラフの構築方法

依存関係グラフは、リポジトリ内のマニフェストとロック ファイルを分析することで、依存関係を自動的に解析します。 自分でデータを送信することもできます。 詳細については、「[依存関係グラフが依存関係を認識する方法](/ja/enterprise-server@3.18/code-security/concepts/supply-chain-security/dependency-graph-data)」を参照してください。

## 依存関係グラフの利用

Enterprise 所有者は、Enterprise の依存関係グラフと Dependabot alerts を構成できます。 詳細については、「[企業の依存関係グラフの有効化](/ja/enterprise-server@3.18/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)」と「[エンタープライズ向けの Dependabot の有効化](/ja/enterprise-server@3.18/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)」を参照してください。

依存関係グラフの構成の詳細については、「 [依存関係グラフの有効化](/ja/enterprise-server@3.18/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph)」を参照してください。

## 依存関係グラフでできること

依存関係グラフを使用する目的は、次のとおりです。

* コードが依存するリポジトリと。 詳細については、「[リポジトリの依存関係を調べる](/ja/enterprise-server@3.18/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository)」を参照してください。
* リポジトリの脆弱な依存関係を表示・更新すること。 詳細については、「[Dependabot alerts](/ja/enterprise-server@3.18/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)」を参照してください。
* Pull Request中の脆弱性がある依存関係に関する情報を見ること。 詳細については、「[プルリクエスト内の依存関係の変更をレビューする](/ja/enterprise-server@3.18/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)」を参照してください。
* 監査またはコンプライアンスの目的でソフトウェア部品表 (SBOM) をエクスポートします。 これは、プロジェクトの依存関係をコンピューターが読み取り可能な正式なインベントリです。 「[リポジトリのソフトウェア部品表のエクスポート](/ja/enterprise-server@3.18/code-security/how-tos/secure-your-supply-chain/establish-provenance-and-integrity/exporting-a-software-bill-of-materials-for-your-repository)」を参照してください。

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

* ```
            Wikipedia の[依存関係グラフ](https://en.wikipedia.org/wiki/Dependency_graph)
  ```
* [リポジトリの依存関係を調べる](/ja/enterprise-server@3.18/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository)
* [Dependabot アラートの表示と更新](/ja/enterprise-server@3.18/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts)
* [脆弱な依存関係の検出](/ja/enterprise-server@3.18/code-security/dependabot/troubleshooting-dependabot/troubleshooting-the-detection-of-vulnerable-dependencies)