Chapter 13: CLI リファレンス
コマンドラインからの操作・自動化(v2.0)
基本構文
Dependa.exe <command> [options]
コマンド一覧
| コマンド | 説明 |
help | ヘルプを表示します。 |
version | バージョン情報を表示します。 |
scan | 指定したパスのプロジェクトをスキャンします。 |
import | SBOM ファイル(CycloneDX / SPDX)をインポートします。 |
review | レビューセッションのステータスを表示・更新します。 |
scan コマンドのオプション
| オプション | 説明 |
--path <path> | スキャン対象のプロジェクトフォルダまたはファイルのパス(必須)。 |
--output <path> | 結果の出力先パス。JSON ファイルとして保存されます。 |
--lang <ja|en> | レポートの言語を指定します(デフォルト: 設定に従う)。 |
--accept-terms | 利用規約に同意します(初回実行時に必要)。 |
--verbose | 詳細なログを出力します。 |
--use-online-vuln | OSV API によるオンライン脆弱性照合を有効にします。Pro |
--use-online-enrichment | PyPI / npm / NuGet によるオンライン補完を有効にします。Pro |
--ai-prompt <type> | AI プロンプトを生成します。type: VulnerabilityRemediation, LicenseReview, DeltaScanReview |
import コマンドのオプション
| オプション | 説明 |
--file <path> | インポートする SBOM ファイルのパス(必須)。CycloneDX / SPDX 形式を自動判別します。 |
--output <path> | 結果の出力先パス。 |
--lang <ja|en> | レポートの言語を指定します。 |
--accept-terms | 利用規約に同意します。 |
終了コード
| コード | 意味 |
0 | 成功(ポリシー違反なし) |
1 | 一般エラー |
2 | ポリシー違反が検出された(High Risk アイテムまたは Prohibited ライセンス) |
3 | Pro ライセンスが必要な機能が使用された |
4 | データパック検証失敗 |
5 | 不正な引数 |
6 | 利用規約に未同意 |
7 | Integrity 検証失敗 |
8 | SBOM 形式が認識できない |
使用例
基本スキャン
Dependa.exe scan --path C:\my-project --accept-terms
SBOM インポート
Dependa.exe import --file C:\sbom\cyclonedx.json --output C:\reports\result.json
結果を JSON に出力
Dependa.exe scan --path C:\my-project --output C:\reports\result.json --lang ja
Pro 機能付きスキャン
Dependa.exe scan --path C:\my-project --use-online-vuln --use-online-enrichment --verbose
AI プロンプト生成付きスキャン
Dependa.exe scan --path C:\my-project --ai-prompt VulnerabilityRemediation
Chapter 13: CLI Reference
Command-line usage and automation (v2.0)
Basic Syntax
Dependa.exe <command> [options]
Commands
| Command | Description |
help | Display help information. |
version | Display version information. |
scan | Scan a project at the specified path. |
import | Import an SBOM file (CycloneDX / SPDX). |
review | Display or update review session status. |
Scan Command Options
| Option | Description |
--path <path> | Path to the project folder or file to scan (required). |
--output <path> | Output path for results. Saved as a JSON file. |
--lang <ja|en> | Specify the report language (default: follows settings). |
--accept-terms | Accept the terms of use (required on first run). |
--verbose | Output detailed logs. |
--use-online-vuln | Enable online vulnerability lookup via OSV API. Pro |
--use-online-enrichment | Enable online enrichment via PyPI / npm / NuGet. Pro |
--ai-prompt <type> | Generate an AI prompt. Types: VulnerabilityRemediation, LicenseReview, DeltaScanReview |
Import Command Options
| Option | Description |
--file <path> | Path to the SBOM file to import (required). Auto-detects CycloneDX / SPDX format. |
--output <path> | Output path for results. |
--lang <ja|en> | Specify the report language. |
--accept-terms | Accept the terms of use. |
Exit Codes
| Code | Meaning |
0 | Success (no policy violations) |
1 | General error |
2 | Policy violation detected (High Risk items or Prohibited license) |
3 | Pro license required for the requested feature |
4 | Data pack verification failed |
5 | Invalid arguments |
6 | Terms of use not accepted |
7 | Integrity verification failed |
8 | SBOM format not recognized |
Usage Examples
Basic Scan
Dependa.exe scan --path C:\my-project --accept-terms
SBOM Import
Dependa.exe import --file C:\sbom\cyclonedx.json --output C:\reports\result.json
Output Results to JSON
Dependa.exe scan --path C:\my-project --output C:\reports\result.json --lang en
Scan with Pro Features
Dependa.exe scan --path C:\my-project --use-online-vuln --use-online-enrichment --verbose
Scan with AI Prompt Generation
Dependa.exe scan --path C:\my-project --ai-prompt VulnerabilityRemediation