Chapter 13: CLI リファレンス

コマンドラインからの操作・自動化(v2.0)

基本構文

Dependa.exe <command> [options]

引数なしで Dependa.exe を起動すると GUI が開きます。標準出力には結果のみが出力され、エラー・警告・通知は標準エラーに出力されます。

コマンド一覧

コマンド説明
helpヘルプを表示します(--help / -h も可)。
versionバージョンとライセンス状態を表示します(--version / -v も可)。
scan指定したパスのプロジェクトをスキャンします。
sbomCycloneDX / SPDX の SBOM ファイルを分析します。Pro
release-check同梱の脆弱性データの鮮度を確認します(--max-age-warn 既定 30 日 / --max-age-block 既定 60 日)。
data-inventory保存先の一覧(移行計画用)を表示します。
release-readinessStore 更新に必要な証跡の状態を表示します。

scan コマンドのオプション

オプション説明
--path <path>スキャン対象のプロジェクトフォルダのパス(必須)。
--output <dir>レポートの出力先フォルダ。省略時はカレントフォルダの reports です(スキャン対象フォルダの下には書き込みません)。
--lang <ja|en>この実行だけの表示言語を指定します(設定は変更されません)。
--accept-terms利用規約に同意します(未同意のときに必要。同意済みなら何も書き込みません)。
--verbose依存関係の詳細一覧などを出力します。
--use-online-vulnOSV API によるオンライン脆弱性照合を有効にします。Pro
--use-online-license-metadataPyPI / npm / NuGet によるオンラインのライセンス情報補完を有効にします。Pro
--ai-prompt <type>AI プロンプトを生成します。type: vuln, license, delta(delta は Pro)
--export <type>文書を出力します。type: review(Pro), notice, inventory, all
--format <fmt>json: 結果を JSON として標準出力へ。md / txt / csv: 出力文書の形式。
--overwrite既存の出力文書を上書きします。
--exceptions <file>適用する例外ファイル(dependa-exceptions.json 形式)。Pro
--policy <file>適用するポリシーファイル(dependa-policy.json 形式)。Pro
--trust-repo-filesスキャン対象フォルダにある例外・ポリシーファイルを適用します。Pro
--fail-on <values>終了コード 2 にする条件(カンマ区切りまたは繰り返し。指定すると既定を置き換えます)。値: critical, high, medium, low(その重大度以上), prohibited-license, unknown-license, policy-fail, range-hit, not-assessed, none。既定: policy-fail
--help, -hscan のヘルプを表示します。

sbom コマンドのオプション Pro

Dependa.exe sbom <file> [options](またはファイルを --path で指定)。CycloneDX / SPDX の JSON を分析します。

オプション説明
--format <text|json>text(既定): 短い要約。json: 結果を JSON として標準出力へ。
--output <dir>dependa-sbom-result.json もこのフォルダに書き込みます。
--fail-on <values>終了コード 2 にする条件。値: critical, high, medium, low, review-high, not-examined, none。既定: critical,high
--lang <ja|en>この実行だけの表示言語を指定します。
--accept-terms利用規約に同意します。

終了コード

コード意味
0成功
1一般エラー(SBOM を読み取れなかった場合を含む)
2--fail-on の条件に該当した(release-check では鮮度が関門の基準を超えた)
3Pro ライセンスが必要な機能が使用された
4予約(現在のバージョンでは返されません)
5不正な引数(存在しない SBOM ファイルを含む)
6利用規約に未同意
7整合性検証失敗

使用例

基本スキャン

Dependa.exe scan --path C:\my-project --accept-terms

結果を JSON で受け取り、重大度 High 以上で失敗させる

Dependa.exe scan --path C:\my-project --format json --fail-on high --lang ja

SBOM の分析(Pro)

Dependa.exe sbom C:\sbom\cyclonedx.json --format json --output C:\reports

Pro 機能付きスキャン

Dependa.exe scan --path C:\my-project --use-online-vuln --use-online-license-metadata --verbose

AI プロンプト生成付きスキャン

Dependa.exe scan --path C:\my-project --ai-prompt vuln

Chapter 13: CLI Reference

Command-line usage and automation (v2.0)

Basic Syntax

Dependa.exe <command> [options]

Starting Dependa.exe without arguments opens the GUI. Standard output holds the result only; errors, warnings and notices go to standard error.

Commands

CommandDescription
helpDisplay help information (--help / -h also work).
versionDisplay the version and license state (--version / -v also work).
scanScan a project at the specified path.
sbomAnalyze a CycloneDX / SPDX SBOM file. Pro
release-checkCheck the freshness of the bundled vulnerability data (--max-age-warn default 30 days / --max-age-block default 60 days).
data-inventoryList storage locations (for migration planning).
release-readinessList the status of Store update readiness evidence.

Scan Command Options

OptionDescription
--path <path>Path to the project folder to scan (required).
--output <dir>Output folder for reports. Default: reports in the current folder (nothing is written under the scanned folder).
--lang <ja|en>Language for this run only (the settings are not changed).
--accept-termsAccept the terms of use (required when not yet accepted; nothing is written when already accepted).
--verboseShow the detailed dependency list and more.
--use-online-vulnEnable online vulnerability lookup via OSV API. Pro
--use-online-license-metadataEnable online license metadata lookup via PyPI / npm / NuGet. Pro
--ai-prompt <type>Generate an AI prompt. Types: vuln, license, delta (delta is Pro)
--export <type>Export a document. Types: review (Pro), notice, inventory, all
--format <fmt>json: the result as JSON on standard output. md / txt / csv: export format.
--overwriteOverwrite existing export files.
--exceptions <file>Exceptions file to apply (dependa-exceptions.json format). Pro
--policy <file>Policy file to apply (dependa-policy.json format). Pro
--trust-repo-filesApply the exceptions and policy files found in the scanned folder. Pro
--fail-on <values>What makes the scan exit with code 2 (comma separated or repeated; giving it replaces the default). Values: critical, high, medium, low (that severity or higher), prohibited-license, unknown-license, policy-fail, range-hit, not-assessed, none. Default: policy-fail
--help, -hShow the help for scan.

sbom Command Options Pro

Dependa.exe sbom <file> [options] (or give the file with --path). Analyzes a CycloneDX or SPDX JSON SBOM.

OptionDescription
--format <text|json>text (default): a short summary. json: the result as JSON on standard output.
--output <dir>Also write dependa-sbom-result.json into this folder.
--fail-on <values>What makes the command exit with code 2. Values: critical, high, medium, low, review-high, not-examined, none. Default: critical,high
--lang <ja|en>Language for this run only.
--accept-termsAccept the terms of use.

Exit Codes

CodeMeaning
0Success
1General error (including an SBOM that could not be read)
2A --fail-on value was triggered (for release-check: the data is older than the blocking threshold)
3Pro license required for the requested feature
4Reserved (not returned by the current version)
5Invalid arguments (including an SBOM file that does not exist)
6Terms of use not accepted
7Integrity verification failed

Usage Examples

Basic Scan

Dependa.exe scan --path C:\my-project --accept-terms

Get the result as JSON and fail on High or above

Dependa.exe scan --path C:\my-project --format json --fail-on high --lang en

Analyze an SBOM (Pro)

Dependa.exe sbom C:\sbom\cyclonedx.json --format json --output C:\reports

Scan with Pro Features

Dependa.exe scan --path C:\my-project --use-online-vuln --use-online-license-metadata --verbose

Scan with AI Prompt Generation

Dependa.exe scan --path C:\my-project --ai-prompt vuln