Chapter 13: CLI リファレンス
コマンドラインからの操作・自動化(v2.0)
基本構文
Dependa.exe <command> [options]
引数なしで Dependa.exe を起動すると GUI が開きます。標準出力には結果のみが出力され、エラー・警告・通知は標準エラーに出力されます。
コマンド一覧
| コマンド | 説明 |
help | ヘルプを表示します(--help / -h も可)。 |
version | バージョンとライセンス状態を表示します(--version / -v も可)。 |
scan | 指定したパスのプロジェクトをスキャンします。 |
sbom | CycloneDX / SPDX の SBOM ファイルを分析します。Pro |
release-check | 同梱の脆弱性データの鮮度を確認します(--max-age-warn 既定 30 日 / --max-age-block 既定 60 日)。 |
data-inventory | 保存先の一覧(移行計画用)を表示します。 |
release-readiness | Store 更新に必要な証跡の状態を表示します。 |
scan コマンドのオプション
| オプション | 説明 |
--path <path> | スキャン対象のプロジェクトフォルダのパス(必須)。 |
--output <dir> | レポートの出力先フォルダ。省略時はカレントフォルダの reports です(スキャン対象フォルダの下には書き込みません)。 |
--lang <ja|en> | この実行だけの表示言語を指定します(設定は変更されません)。 |
--accept-terms | 利用規約に同意します(未同意のときに必要。同意済みなら何も書き込みません)。 |
--verbose | 依存関係の詳細一覧などを出力します。 |
--use-online-vuln | OSV API によるオンライン脆弱性照合を有効にします。Pro |
--use-online-license-metadata | PyPI / 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, -h | scan のヘルプを表示します。 |
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 では鮮度が関門の基準を超えた) |
3 | Pro ライセンスが必要な機能が使用された |
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
| Command | Description |
help | Display help information (--help / -h also work). |
version | Display the version and license state (--version / -v also work). |
scan | Scan a project at the specified path. |
sbom | Analyze a CycloneDX / SPDX SBOM file. Pro |
release-check | Check the freshness of the bundled vulnerability data (--max-age-warn default 30 days / --max-age-block default 60 days). |
data-inventory | List storage locations (for migration planning). |
release-readiness | List the status of Store update readiness evidence. |
Scan Command Options
| Option | Description |
--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-terms | Accept the terms of use (required when not yet accepted; nothing is written when already accepted). |
--verbose | Show the detailed dependency list and more. |
--use-online-vuln | Enable online vulnerability lookup via OSV API. Pro |
--use-online-license-metadata | Enable 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. |
--overwrite | Overwrite 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-files | Apply 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, -h | Show 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.
| Option | Description |
--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-terms | Accept the terms of use. |
Exit Codes
| Code | Meaning |
0 | Success |
1 | General error (including an SBOM that could not be read) |
2 | A --fail-on value was triggered (for release-check: the data is older than the blocking threshold) |
3 | Pro license required for the requested feature |
4 | Reserved (not returned by the current version) |
5 | Invalid arguments (including an SBOM file that does not exist) |
6 | Terms of use not accepted |
7 | Integrity 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