

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon Inspector SBOM Generator ライセンスコレクション
<a name="sbom-generator-license-collection"></a>

 Amazon Inspector SBOM Generator で、ソフトウェア部品表 (SBOM) のライセンス情報を追跡できます。オペレーティングシステムとプログラミング言語全体でサポートされているパッケージからライセンス情報を収集します。生成された SBOM に標準化されたライセンス表現が含まれているため、ライセンス上の義務を把握できます。

## ライセンス情報を収集する
<a name="w2aac37c31b5"></a>

**コマンドの例**  
 次の例は、 ディレクトリからライセンス情報を収集する方法を示しています。

```
./inspector-sbomgen directory --path /path/to/your/directory/ --collect-licenses
```

**SBOM コンポーネントの例**  
 次の例は、生成された SBOM のコンポーネントエントリを示しています。

```
"components": [   
    {
      "bom-ref": "comp-2",
      "type": "application",
      "name": "sample-js-pkg",
      "version": "1.2.3",
      "licenses": [
        {
          "expression": "Apache-2.0 AND (MIT OR GPL-2.0-only)"
        }
      ],
      "purl": "pkg:npm/sample-js-pkg@1.2.3",
    }
  ]
```

## サポートされているパッケージ
<a name="w2aac37c31b7"></a>

 ライセンス収集では、次のプログラミング言語とオペレーティングシステムパッケージがサポートされています。


| ターゲット | パッケージマネージャー | ライセンス情報ソース | タイプ | 
| --- | --- | --- | --- | 
| Alma Linux | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| Amazon Linux | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| CentOS | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| Fedora | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| OpenSUSE | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| Oracle Linux | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| Photon OS | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| RHEL | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| Rocky Linux | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| SLES | RPM |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | OS | 
| Alpine Linux | APK | /lib/apk/db/installed | OS | 
| Chainguard | APK | /lib/apk/db/installed | OS | 
| Debian | DPKG | /usr/share/doc/\*/copyright | OS | 
| Ubuntu | DPKG | /usr/share/doc/\*/copyright | OS | 
| Node.js | Javascript | node\_modules/\*/package.json | プログラミング言語 | 
| PHP | Composer パッケージ |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | プログラミング言語 | 
| Go | Go | LICENSE | プログラミング言語 | 
| Python | Python/Egg/Wheel |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/ja_jp/inspector/latest/user/sbom-generator-license-collection.html)  | プログラミング言語 | 
| Ruby | RubyGem | \*.gemspec | プログラミング言語 | 
| Rust | crate | Cargo.toml | プログラミング言語 | 

### ライセンス表現の標準化
<a name="w2aac37c31b7b7"></a>

 SPDX のライセンス表現形式は、オープンソースソフトウェアに見られるライセンス条件を正確に表現します。Amazon Inspector SBOM Generator は、このセクションで説明するルールにしたがって、すべてのライセンス情報を SPDX ライセンス表現に標準化します。このルールにより、ライセンス情報間の一貫性と互換性が実現します。

**SPDX 短縮形式識別子マッピング**  
 すべてのライセンス名は SPDX 短縮形式識別子にマッピングされます。例えば、`MIT License` は `MIT` に短縮されます。

**複数のライセンスの組み合わせ**  
 複数のライセンスを `AND` 演算子と組み合わせることができます。次のコマンドの例は、 コマンドをフォーマットする方法を示しています。

```
MIT AND Apache-2.0
```

**カスタムライセンスプレフィックス**  
 カスタムライセンスには `LicenseRef` がプレフィックスとして付与され、 `LicenseRef-CompanyPrivate` のようになります。

**カスタム例外プレフィックス**  
 カスタム例外には `AdditionRef-` がプレフィックスとして付与され、 `AdditionRef-CustomException` のようになります。