Skip to content

feat: add cve-enrich tool and CLI subcommand for multi-source CVE enrichment - #170

Open
manus-use wants to merge 1 commit into
mainfrom
feat/cve-enrich
Open

feat: add cve-enrich tool and CLI subcommand for multi-source CVE enrichment#170
manus-use wants to merge 1 commit into
mainfrom
feat/cve-enrich

Conversation

@manus-use

Copy link
Copy Markdown
Owner

Summary

Add a lightweight, non-agent CVE enrichment tool that fetches data from multiple public sources in parallel and returns a unified risk snapshot.

Motivation

Currently, getting a complete picture of a CVE requires manually invoking multiple tools (get_nvd_data, EPSS APIs, check_cisa_kev, get_osv_data, etc.) and mentally combining their outputs. This tool provides a single-call enrichment pipeline that:

  1. Removes the need for an LLM agent for basic CVE triage
  2. Provides a programmatic building block for other tools and workflows
  3. Adds a quick CLI subcommand for analysts who just want a snapshot

What's included

New tool: cve_enrich (src/manus_agent/tools/cve_enrich.py)

  • Parallel fetching via ThreadPoolExecutor (5 sources, ~15s worst case)
  • Sources: NVD (CVSS, CWE, references), EPSS (exploitation probability), CISA KEV (active exploitation), OSV.dev (affected packages + fixed versions), VulnCheck KEV (multi-source exploitation signal)
  • Composite risk scoring: Weighted combination of CVSS severity, EPSS probability, KEV presence → produces critical/high/medium/low/unknown level
  • Graceful partial failure: Individual source errors don't break the pipeline
  • Strands @tool interface for direct agent use
  • Public enrich_cve() function for programmatic consumption

New CLI subcommand: manus-agent enrich

# Quick triage with colored text output
manus-agent enrich CVE-2024-3094

# Machine-readable JSON
manus-agent enrich CVE-2024-3094 --output json

# Skip VulnCheck if no API key
manus-agent enrich CVE-2024-3094 --no-vulncheck

Test suite: 43 new tests (tests/test_cve_enrich.py)

All HTTP calls fully mocked. Covers:

  • Each fetcher function (success, error, edge cases)
  • Risk computation logic (all severity levels)
  • Integration scenarios (partial failure, exceptions, case normalization)
  • CLI text/JSON output modes
  • Strands tool interface

Test results

43 passed in 1.35s (new tests)
1201 passed, 3 deselected, 3 warnings in 25.55s (full suite)

Usage as a building block

from manus_agent.tools.cve_enrich import enrich_cve

result = enrich_cve("CVE-2024-3094")
print(result["risk_assessment"]["level"])  # 'critical'
print(result["epss"]["score"])              # 0.975
print(result["cisa_kev"]["in_kev"])         # True

Add a lightweight multi-source CVE enrichment tool that fetches data from
NVD, EPSS, CISA KEV, OSV.dev, and VulnCheck KEV **in parallel** and returns
a unified risk snapshot. No LLM agent required — pure API aggregation.

Features:
- Parallel fetching via ThreadPoolExecutor (5 sources, ~15s worst case)
- Composite risk scoring from CVSS, EPSS, CISA KEV, VulnCheck signals
- CVE ID validation and case normalization
- Graceful partial failure: individual source errors don't break the pipeline
- Strands @tool interface for agent use
- CLI subcommand: manus-agent enrich CVE-XXXX-YYYY [--output json|text] [--no-vulncheck]
- Text output with color-coded risk levels and structured sections
- JSON output for programmatic consumption

Test coverage: 43 new tests covering all fetcher functions, risk computation,
integration scenarios (partial failure, exceptions, missing APIs), CLI text/json
output modes, and the Strands tool interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant