Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
cyclonedx-cli — CycloneDX SBOMをJSON、XML、Protobuf、CSV、SPDX形式で生成、解析、マージ、差分比較、検証、署名、変換するCLI。 | Kitploit
ツール/GitHubGitHub/cyclonedx/cyclonedx-cli
防御ツール暗号化DevSecOpsユーティリティとフレームワークサプライチェーンセキュリティ
GitHubcyclonedx/cyclonedx-cli

cyclonedx-cli

CycloneDX SBOMをJSON、XML、Protobuf、CSV、SPDX形式で生成、解析、マージ、差分比較、検証、署名、変換するCLI。

リポジトリを見る
533813日前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
ウェブサイト

Docker Image License Website Slack Invite Group Discussion Twitter

root@kitploit:~
   ______           __                 ____ _  __    ________    ____
  / ____/_  _______/ /___  ____  ___  / __ \ |/ /   / ____/ /   /  _/
 / /   / / / / ___/ / __ \/ __ \/ _ \/ / / /   /   / /   / /    / /
/ /___/ /_/ / /__/ / /_/ / / / /  __/ /_/ /   |   / /___/ /____/ /
\____/\__, /\___/_/\____/_/ /_/\___/_____/_/|_|   \____/_____/___/
     /____/

Usage:
  cyclonedx [command] [options]

Options:
  --version         Show version information
  -?, -h, --help    Show help and usage information

Commands:
  add                         Add information to a BOM (currently supports files)
  analyze                     Analyze a BOM file
  convert                     Convert between different BOM formats
  diff <from-file> <to-file>  Generate a BOM diff
  keygen                      Generates an RSA public/private key pair for BOM signing
  merge                       Merge two or more BOMs
  sign                        Sign a BOM or file
  validate                    Validate a BOM
  verify                      Verify signatures in a BOM

CycloneDX CLIツールは現在、BOMの分析、変更、差分生成、マージ、フォーマット変換、署名、検証をサポートしています。

CycloneDX XML、JSON、Protobuf、CSV、SPDX JSON v2.3間の変換がサポートされています。

バイナリはリリースページからダウンロードできます。

注:CycloneDX CLIツールは自動化ユースケース向けに構築されています。--input-fileオプションを持つコマンドはすべて、stdinからの入力にも対応しています。同様に、--output-fileオプションを持つコマンドはすべて、stdoutへの出力にも対応しています。ただし、入出力フォーマットの指定が必要です。

例:
cat bom.json | cyclonedx-cli convert --input-format json --output-format xml > bom.xml

コマンド

追加コマンド

ファイル追加サブコマンド

root@kitploit:~
files
  Add files to a BOM

Usage:
  cyclonedx add files [options]

Options:
  --input-file <input-file>                       Input BOM filename.
  --no-input                                      Use this option to indicate that there is no input BOM.
  --output-file <output-file>                     Output BOM filename, will write to stdout if no value provided.
  --input-format <autodetect|json|protobuf|xml>   Specify input file format.
  --output-format <autodetect|json|protobuf|xml>  Specify output file format.
  --base-path <base-path>                         Base path for directory to process (defaults to current working directory if omitted).
  --include <include>                             Apache Ant style path and file patterns to specify what to include (defaults to all files, separate patterns with a space).
  --exclude <exclude>                             Apache Ant style path and file patterns to specify what to exclude (defaults to none, separate patterns with a space).

例

Gitリポジトリのディレクトリを除外して、ソースコードBOMを生成:
cyclonedx-cli add files --no-input --output-format json --exclude /.git/**

既存のBOMにbinディレクトリのビルド出力ファイルを追加:
cyclonedx-cli add files --input-file bom.json --output-format json --base-path bin

分析コマンド

root@kitploit:~
analyze
  Analyze a BOM file

Usage:
  cyclonedx analyze [options]

Options:
  --input-file <input-file>                      Input BOM filename, will read from stdin if no value provided.
  --input-format <autodetect|json|protobuf|xml>  Specify input file format.
  --output-format <json|text>                    Specify output format (defaults to text).
  --multiple-component-versions                  Report components that have multiple versions in use.

例

異なるバージョンで複数回含まれているコンポーネントをレポート:
cyclonedx-cli analyze --input-file sbom.xml --multiple-component-versions

変換コマンド

root@kitploit:~
convert
  Convert between different BOM formats

Usage:
  cyclonedx convert [options]

Options:
  --input-file <input-file>                                    Input BOM filename, will read from stdin if no value provided.
  --output-file <output-file>                                  Output BOM filename, will write to stdout if no value provided.
  --input-format <autodetect|csv|json|protobuf|spdxjson|xml>   Specify input file format.
  --output-format <autodetect|csv|json|protobuf|spdxjson|xml>  Specify output file format.
  --output-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5|v1_6|v1_7>   Specify output BOM specification version. (ignored for CSV and SPDX formats)

例

XMLからJSON形式への変換:
cyclonedx-cli convert --input-file sbom.xml --output-file sbom.json

XMLからJSON形式に変換して出力を他のツールにパイプ:
cyclonedx-cli convert --input-file sbom.xml --output-format json | grep "somthing"

CSVフォーマット

CSVフォーマットは、BOM内のコンポーネントのリストを限定して表現したものです。

これは、ユーザーが単純なユースケース向けにBOMを簡単に生成・利用できる方法を提供することを意図しています。単純なデータ移行のユースケースも含みます。

必須フィールドはコンポーネントのnameとversionのみです。その他は空欄のままにするか、列ごと省略できます。

example.csv

SPDXフォーマット

SPDX形式とCycloneDX形式の間で変換すると、一部の情報が失われる可能性があります。変換機能は、CycloneDX .NETライブラリプロジェクトの一部であるCycloneDX.Spdx.Interopライブラリによって提供されています。

失われる情報の詳細については、CycloneDX .NETライブラリのプロジェクトページを参照してください。

差分コマンド

root@kitploit:~
diff
  Generate a BOM diff

Usage:
  cyclonedx diff <from-file> <to-file> [options]

Arguments:
  <from-file>  From BOM filename.
  <to-file>    To BOM filename.

Options:
  --from-format <autodetect|json|protobuf|xml>  Specify from file format.
  --to-format <autodetect|json|protobuf|xml>    Specify to file format.
  --output-format <json|text>                   Specify output format (defaults to text).
  --component-versions                          Report component versions that have been added, removed or modified.

例

バージョンが変更されたコンポーネントをレポート:
cyclonedx-cli diff sbom-from.xml sbom-to.xml --component-versions

キー生成コマンド

root@kitploit:~
keygen
  Generates an RSA public/private key pair for BOM signing

Usage:
  cyclonedx keygen [options]

Options:
  --private-key-file <private-key-file>  Filename for generated private key file (defaults to "private.key")
  --public-key-file <public-key-file>    Filename for generated public key file (defaults to "public.key")

マージコマンド

root@kitploit:~
merge
  Merge two or more BOMs

Usage:
  cyclonedx merge [options]

Options:
  --input-files <input-files>                                Input BOM filenames (separate filenames with a space).
  --output-file <output-file>                                Output BOM filename, will write to stdout if no value provided.
  --input-format <autodetect|json|protobuf|xml>              Specify input file format.
  --output-format <autodetect|json|protobuf|xml>             Specify output file format.
  --output-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5|v1_6|v1_7> Specify output BOM specification version.
  --hierarchical                                             Perform a hierarchical merge.
  --group <group>                                            Provide the group of software the merged BOM describes.
  --name <name>                                              Provide the name of software the merged BOM describes (required for hierarchical merging).
  --version <version>                                        Provide the version of software the merged BOM describes (required for hierarchical merging).

注:階層マージを実行するには、すべてのBOMのmetadataコンポーネント要素に、マージ対象のBOMが記述されている必要があります。

例

2つのXML形式のBOMをマージ:
cyclonedx-cli merge --input-files sbom1.xml sbom2.xml --output-file sbom_all.xml

2つのBOMをマージして出力を他のツールにパイプ:
cyclonedx-cli merge --input-files sbom1.xml sbom2.xml --output-format json | grep "something"

署名コマンド

BOMまたはファイルに署名します

BOM署名サブコマンド

root@kitploit:~
bom
  Sign the entire BOM document

Usage:
  cyclonedx sign bom <bom-file> [options]

Arguments:
  <bom-file>  BOM filename

Options:
  --key-file <key-file>  Signing key filename (RSA private key in PEM format, defaults to "private.key")

ファイル署名サブコマンド

root@kitploit:~
file
  Sign arbitrary files and generate a PKCS1 RSA SHA256 signature file

Usage:
  cyclonedx sign file <file> [options]

Arguments:
  <file>  Filename of the file the signature will be created for

Options:
  --key-file <key-file>              Signing key filename (RSA private key in PEM format, defaults to "private.key")
  --signature-file <signature-file>  Filename of the generated signature file (defaults to the filename with ".sig" appended)

検証コマンド

root@kitploit:~
validate
  Validate a BOM

Usage:
  cyclonedx validate [options]

Options:
  --input-file <input-file>                                  Input BOM filename, will read from stdin if no value provided.
  --input-format <autodetect|json|xml>                       Specify input file format.
  --input-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5|v1_6|v1_7>  Specify input file specification version (defaults to v1.7)
  --fail-on-errors                                           Fail on validation errors (return a non-zero exit code)

例

BOMを検証し、非ゼロの終了コードを返します(ビルドなどを自動的に「失敗」させるのに便利です)
cyclonedx-cli validate --input-file sbom.xml --fail-on-errors

署名検証コマンド

BOMおよびファイルの署名を検証します

全件検証サブコマンド

root@kitploit:~
all
  Verify all signatures in a BOM

Usage:
  cyclonedx verify all <bom-file> [options]

Arguments:
  <bom-file>  BOM filename

Options:
  --key-file <key-file>  Public key filename (RSA public key in PEM format, defaults to "public.key")

ファイル検証サブコマンド

root@kitploit:~
file
  Verifies a PKCS1 RSA SHA256 signature file for an arbitrary file

Usage:
  cyclonedx verify file <file> [options]

Arguments:
  <file>  File the signature file is for

Options:
  --key-file <key-file>              Public key filename (RSA public key in PEM format, defaults to "public.key")
  --signature-file <signature-file>  Signature file to be verified (defaults to the filename with ".sig" appended)

Dockerイメージ

CycloneDX CLIツールは、dockerを使用して実行することもできます:docker run cyclonedx/cyclonedx-cli

Homebrew

LinuxおよびMacOSでは、CycloneDX Homebrew tapを使用してCLIをインストールできます:

root@kitploit:~
brew install cyclonedx/cyclonedx/cyclonedx-cli

サポート対象プラットフォーム

公式にサポートされているビルドは、以下のプラットフォームで利用できます:

  • Windows x64 (win-x64)
  • Linux x64 (linux-x64)
  • Linux musl x64 (linux-musl-x64、Alpine Linuxを含む)
  • MacOS x64 (osx-x64)

コミュニティサポートのビルドは、以下のプラットフォームで利用できます:

  • Windows x86 (win-x86)
  • Windows ARM x64 (win-arm64)
  • Linux ARM (linux-arm)
  • Linux ARM x64 (linux-arm64)
  • MacOS ARM x64 (osx-arm64)

.NET Coreランタイムの依存関係が必要です。

Windowsでは、これらはプレインストールされているはずです。

Ubuntuの場合は、libc6 libgcc1 libgssapi-krb5-2 libicu66 libssl1.1 libstdc++6 zlib1gが必要です。

gronを使用したアドホックな検索と分析

gronはJSONを個別の代入文に変換し、必要な情報をgrepしやすくするとともに、その絶対的な「パス」を確認しやすくします。

便宜上、gronはCycloneDX CLIのDockerイメージに含まれています。

すべてのコンポーネント名とバージョンを一覧表示する使用例

root@kitploit:~
$ gron bom-1.2.json | grep -E "(components\[[[:digit:]]*\].name)|(components\[[[:digit:]]*\].version)"

json.components[0].name = "tomcat-catalina";
json.components[0].version = "9.0.14";
json.components[1].name = "mylibrary";
json.components[1].version = "1.0.0";

または、XML形式のBOMを使用した同じ例

root@kitploit:~
$ cyclonedx convert --input-file bom.xml --output-format json | gron | grep -E "(components\[[[:digit:]]*\].name)|(components\[[[:digit:]]*\].version)"

json.components[0].name = "tomcat-catalina";
json.components[0].version = "9.0.14";
json.components[1].name = "mylibrary";
json.components[1].version = "1.0.0";

gronの使用の詳細については、gronプロジェクトページを参照してください。

grepの使用の詳細については、grepのmanページを参照してください。

ライセンス

変更および再配布は、Apache 2.0ライセンスの条件の下で許可されています。完全なライセンスについてはLICENSEファイルを参照してください。

コントリビューション

プルリクエストは歓迎します。ただし、最初にCycloneDXコントリビューションガイドラインをお読みください。

ソリューションをローカルでビルドおよびテストするには、.NET 8がインストールされている必要があります。dotnet buildやdotnet testなどの標準コマンドが使用できます。

通常、プルリクエストには関連するテストを含めることが期待されています。テストはすべてのプルリクエストに対してWindows、MacOS、Linuxで自動的に実行されます。ビルド警告があるとビルドが失敗します。

アクセスできないプラットフォームで失敗しているテストのデバッグに問題がある場合は、お知らせください。

ツールをダウンロード