> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/kdosukyan/miscellaneous/generate-sbom-based-on-open-source-packages.md).

# オープンソースパッケージに基づいてSBOMを生成する

## SBOMのエクスポート

Aikidoでは両方をエクスポートできます **SBOM（Software Bill of Materials）** に、 **VEX（Vulnerability Exploitability eXchange）** ファイル。これらのエクスポートにより、オープンソースコンポーネントを含むソフトウェアコンポーネントを把握でき、実際に修正が必要なものの優先順位付けに役立ちます。

**ユースケース:**

* **SBOMのエクスポート** (CycloneDX 1.6、SPDX-2.3 または CSV)
  * M\&A、調達、監査（例: ISO 27001、SOC2）の際に第三者と共有できます。
  * Cyber Resilience Act（CRA）、Medical Device Regulation（MDR）、または大統領令14028のような規制への対応。
  * 第三者リスク管理ツールや調達ツールに取り込めます。
* **VEXのエクスポート** (CycloneDXのみ)
  * どの脆弱性が **悪用可能か** また、どれが **該当しないか**.
  * デューデリジェンスの証明として、VEXは既知の脆弱性を積極的に管理していることを第三者に証明します。

### SBOMの場所 <a href="#where-to-find-the-sbom" id="where-to-find-the-sbom"></a>

**ステップ 1.** レポート > に移動し、 [ライセンス & SBOM](https://app.aikido.dev/licenses)

**ステップ 2.** 右上のアクションからSPDX、CycloneDX、またはCSV形式のSBOMをダウンロードします

![フィルターとSBOMダウンロード機能付きのPythonパッケージライセンスリスク概要。](/files/0767798375ce9e57a1d8cd38d61ec8032509dc38)

**任意。** さまざまな条件でライセンスを絞り込み、その後SBOMをエクスポートします。エクスポートには選択したフィルター値が反映されます。

![ライセンス、言語、リスク、コンテナオプションでリポジトリを検索するためのフィルターメニュー。](/files/d2a71946d391b359d7295fc203be36d3674304a2)

チームで絞り込みたい場合は、ページ上部のチームフィルターを変更して行えます。

![Licenses & SBOMレポートを表示するためのチーム選択ドロップダウン。](/files/2de6c2888bb92f96be4dc29461e5189806c8c08e)

> マルチブランチスキャンを有効にしている場合は、ドロップダウンで特定のブランチリポジトリを選択することで、ブランチごとに異なるSBOMを取得できます。詳細はアプリ内チャットでお問い合わせください。

#### API経由で生成・エクスポート <a href="#generate-and-export-via-api" id="generate-and-export-via-api"></a>

当社の [SBOMエクスポートAPI](https://apidocs.aikido.dev/reference/exportcoderepolicenses).

## 自生成SBOMの監視

BuildrootやYoctoなどのツールを使って構築された組み込みシステムは、ビルド時にSBOMを生成できます。これらのシステムには標準のコンテナレジストリがないことが多いため、こうした自生成SBOMをAPI経由でAikidoにアップロードし、サプライチェーンのセキュリティとライセンスコンプライアンスを監視できます。

### Buildroot / YoctoによるSBOMの生成

{% tabs %}
{% tab title="Buildroot" %}
Buildrootは、組み込みの [generate-cyclonedx](https://buildroot.org/downloads/manual/manual.html#_generating_cyclonedx_sbom) ユーティリティを使ってCycloneDX SBOMを生成します。このユーティリティは `make show-info`.

{% stepper %}
{% step %}

#### SBOMの生成

以下のコマンドを実行します:

```bash
make show-info | utils/generate-cyclonedx > sbom.cdx.json
```

これにより、組み込みLinuxシステム内の各パッケージを、そのバージョン、ライセンス、ソース情報とともに一覧化した単一のCycloneDX JSONファイルが作成されます。
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Yocto SPDX 2.2 エンジン" %}

### YoctoのSPDX 2.2 エンジンの使用

Yoctoは、次の機能を通じてネイティブのSPDX 2.2 SBOM生成を提供します： `create-spdx` クラス。これはYocto 3.4（Honister）以降安定版で、デフォルトで有効です。

{% stepper %}
{% step %}

#### YoctoのSPDX 2.2エンジンを設定する

次を `conf/local.conf` に追加して、各レシピごとにSPDX 2.2ドキュメントを生成するようYoctoに指示します：

```
INHERIT += "create-spdx"
```

{% hint style="warning" %}
Yoctoの次のオプションを無効にすることを推奨します [SPDX\_INCLUDE\_SOURCES](https://docs.yoctoproject.org/dev/ref-manual/variables.html#term-SPDX_INCLUDE_SOURCES) これはSBOMのサイズを不必要に増大させるためです。
{% endhint %}
{% endstep %}

{% step %}

#### イメージのビルド

通常のBitBakeビルドを実行します:

```bash
bitbake <your-image-name>
```

ビルドが成功すると、SPDXファイルは次の場所に書き込まれます：

```
tmp/deploy/spdx/<MACHINE>/
```

最上位のイメージドキュメント（例： `<IMAGE>-<MACHINE>.spdx.json`）は、同じディレクトリ内の各パッケージごとのSPDXドキュメントにリンクしています。Aikidoにアップロードする前に、各パッケージのSPDXファイルを1つのSPDXファイルにまとめることを推奨します。
{% endstep %}

{% step %}

#### 単一のSBOMにマージ

Yoctoは複数の `*.spdx.json` ファイル（レシピごとに1つ）を生成するため、手動で1つのSBOMファイルにマージする必要があります。これは次のものを使って簡単に行えます： [SPDXMergeTool](https://github.com/philips-software/SPDXMerge) または [sbomasm - assemble](https://github.com/interlynk-io/sbomasm/blob/main/docs/assemble.md#merge-algorithms).
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

### SBOMをAikidoにアップロード

次を使用してください: [コンテナSBOMアップロードAPI](https://apidocs.aikido.dev/reference/uploadcontainersbom) を使って生成したファイルを送信します。 [API 認可ドキュメント](https://apidocs.aikido.dev/reference/authorization) APIキーの取得と使用方法の詳細は

```bash
#JSONファイルの単語分割を防ぐ
SBOM=$(cat /path/to/sbom.spdx.json)

#CycloneDXとSPDXの両方をJSON形式で受け付けます
curl -X POST "https://app.aikido.dev/api/public/v1/containers/sbom" \
  -H "accept: application/json" \
  -H "Authorization: Bearer $AIKIDO_API_KEY" \
  -H "Content-Type: application/json" \\
  -d "{\"sbom\": $SBOM, \"container_image_name\": \"$YOUR_CONTAINER_NAME\"}"
```

Aikidoは、アップロードされたSBOMを次の項目の下に表示します： **コンテナ** レジストリとともに *自己申告SBOM* に、 **自動的にスキャンを開始** して、脆弱性とライセンスリスクを検査します。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/kdosukyan/miscellaneous/generate-sbom-based-on-open-source-packages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
