DefectDojo MCP Server

MIT License
1
  • Linux
  • Apple

Integrations

  • Provides a Model Context Protocol (MCP) server implementation for DefectDojo (built on Django), enabling interaction with DefectDojo's vulnerability management system, including tools for managing findings, products, and engagements.

DefectDojo MCP サーバー

このプロジェクトは、人気のオープンソース脆弱性管理ツールであるDefectDojo用のModel Context Protocol (MCP)サーバー実装を提供します。これにより、AIエージェントやその他のMCPクライアントがプログラム的に DefectDojo API とやり取りできるようになります。

特徴

この MCP サーバーは、主要な DefectDojo エンティティを管理するためのツールを公開します。

  • **結果:**取得、検索、作成、ステータスの更新、メモの追加。
  • **製品:**入手可能な製品を一覧表示します。
  • エンゲージメント: エンゲージメントの一覧表示、詳細の取得、作成、更新、およびクローズを行います。

インストールと実行

このサーバーを実行するにはいくつかの方法があります。

uvxの使用(推奨)

uvx一時的な仮想環境で Python アプリケーションを実行し、依存関係を自動的にインストールします。

uvx defectdojo-mcp

pipの使用

pipを使用して、パッケージを Python 環境にインストールできます。

# Install directly from the cloned source code directory pip install . # Or, if the package is published on PyPI pip install defectdojo-mcp

pip でインストールしたら、次のコマンドを使用してサーバーを実行します。

defectdojo-mcp

構成

DefectDojo インスタンスに接続するには、サーバーに次の環境変数が必要です。

  • DEFECTDOJO_API_TOKEN (必須): 認証用の DefectDojo API トークン。
  • DEFECTDOJO_API_BASE (必須): DefectDojo インスタンスのベース URL (例: https://your-defectdojo-instance.com )。

これらはMCPクライアントの設定ファイルで設定できます。以下はuvxコマンドを使った例です。

{ "mcpServers": { "defectdojo": { "command": "uvx", "args": ["defectdojo-mcp"], "env": { "DEFECTDOJO_API_TOKEN": "YOUR_API_TOKEN_HERE", "DEFECTDOJO_API_BASE": "https://your-defectdojo-instance.com" } } } }

pipを使用してパッケージをインストールした場合、構成は次のようになります。

{ "mcpServers": { "defectdojo": { "command": "defectdojo-mcp", "args": [], "env": { "DEFECTDOJO_API_TOKEN": "YOUR_API_TOKEN_HERE", "DEFECTDOJO_API_BASE": "https://your-defectdojo-instance.com" } } } }

利用可能なツール

MCP インターフェース経由では次のツールが利用できます。

  • get_findings : フィルタリング (product_name、status、severity) とページ区切り (limit、offset) を使用して検出結果を取得します。
  • search_findings : フィルタリングとページ区切りを使用して、テキストクエリを使用して結果を検索します。
  • update_finding_status : 特定の検出結果のステータスを変更します (例: アクティブ、検証済み、誤検知)。
  • add_finding_note : 検出結果にテキストメモを追加します。
  • create_finding : テストに関連付けられた新しい検出結果を作成します。
  • list_products : フィルタリング (名前、製品タイプ) とページ区切りを使用して製品を一覧表示します。
  • list_engagements : フィルタリング (product_id、ステータス、名前) とページ区切りを使用してエンゲージメントを一覧表示します。
  • get_engagement : ID で特定のエンゲージメントの詳細を取得します。
  • create_engagement : 製品の新しいエンゲージメントを作成します。
  • update_engagement : 既存のエンゲージメントの詳細を変更します。
  • close_engagement : エンゲージメントを完了としてマークします。

(各ツールの詳細な使用例については、以下の元のREADMEコンテンツを参照してください)

使用例

(注: これらの例では、 use_mcp_toolを呼び出すことができる MCP クライアント環境を想定しています)

調査結果を取得する

# Get active, high-severity findings (limit 10) result = await use_mcp_tool("defectdojo", "get_findings", { "status": "Active", "severity": "High", "limit": 10 })

検索結果

# Search for findings containing 'SQL Injection' result = await use_mcp_tool("defectdojo", "search_findings", { "query": "SQL Injection" })

調査結果ステータスの更新

# Mark finding 123 as Verified result = await use_mcp_tool("defectdojo", "update_finding_status", { "finding_id": 123, "status": "Verified" })

発見事項にメモを追加

result = await use_mcp_tool("defectdojo", "add_finding_note", { "finding_id": 123, "note": "Confirmed vulnerability on staging server." })

発見を作成

result = await use_mcp_tool("defectdojo", "create_finding", { "title": "Reflected XSS in Search Results", "test_id": 55, # ID of the associated test "severity": "Medium", "description": "User input in search is not properly sanitized, leading to XSS.", "cwe": 79 })

製品一覧

# List products containing 'Web App' in their name result = await use_mcp_tool("defectdojo", "list_products", { "name": "Web App", "limit": 10 })

リストエンゲージメント

# List 'In Progress' engagements for product ID 42 result = await use_mcp_tool("defectdojo", "list_engagements", { "product_id": 42, "status": "In Progress" })

エンゲージメントを獲得する

result = await use_mcp_tool("defectdojo", "get_engagement", { "engagement_id": 101 })

エンゲージメントを生み出す

result = await use_mcp_tool("defectdojo", "create_engagement", { "product_id": 42, "name": "Q2 Security Scan", "target_start": "2025-04-01", "target_end": "2025-04-15", "status": "Not Started" })

エンゲージメントの更新

result = await use_mcp_tool("defectdojo", "update_engagement", { "engagement_id": 101, "status": "In Progress", "description": "Scan initiated." })

緊密な交戦

result = await use_mcp_tool("defectdojo", "close_engagement", { "engagement_id": 101 })

発達

設定

  1. リポジトリをクローンします。
  2. 仮想環境を使用することをお勧めします。
    python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
  3. 開発依存関係を含む依存関係をインストールします。
    pip install -e ".[dev]"

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

貢献

貢献を歓迎します!バグ、機能リクエスト、ご質問などございましたら、お気軽にIssueを開いてください。コードの貢献をご希望の場合は、まずIssueを開いて、提案された変更について議論してください。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

AI エージェントやその他の MCP クライアントが脆弱性管理ツールである DefectDojo とプログラム的に対話して、調査結果、製品、エンゲージメントを管理できるようにするモデル コンテキスト プロトコル サーバー実装を提供します。

  1. Features
    1. Installation & Running
      1. Using uvx (Recommended)
      2. Using pip
    2. Configuration
      1. Available Tools
        1. Usage Examples
          1. Get Findings
          2. Search Findings
          3. Update Finding Status
          4. Add Note to Finding
          5. Create Finding
          6. List Products
          7. List Engagements
          8. Get Engagement
          9. Create Engagement
          10. Update Engagement
          11. Close Engagement
        2. Development
          1. Setup
        3. License
          1. Contributing
            ID: exlay0zmev