feat: add cve-neighbors tool and CLI subcommand (+51 tests) - #180
Open
manus-use wants to merge 1 commit into
Open
feat: add cve-neighbors tool and CLI subcommand (+51 tests)#180manus-use wants to merge 1 commit into
manus-use wants to merge 1 commit into
Conversation
Adds a new tool and CLI subcommand that finds other CVEs affecting the same product or package as a given CVE — the 'neighborhood' of vulnerabilities you should patch together. Strategy: 1. Fetch target CVE from NVD → extract CPE vendor:product pairs 2. Search NVD for other CVEs matching the same product keyword 3. Enrich neighbors with EPSS exploitation probability scores 4. Return a prioritised list (highest EPSS first) with CVSS, publication date, and description for each Usage: manus-agent cve-neighbors CVE-2021-44228 manus-agent cve-neighbors CVE-2021-44228 --max-results 20 --output json Tool function: get_cve_neighbors (compatible with Strands tool interface) Test coverage: - Input validation (5 tests) - NVD fetch failures (4 tests) - CPE product extraction (6 tests) - CVSS extraction (5 tests) - Description extraction (4 tests) - EPSS batch fetch (4 tests) - Main tool success paths (8 tests) - NVD headers (3 tests) - CLI subcommand (5 tests) - Edge cases (7 tests) Total: 51 tests, all passing
This was referenced Aug 7, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
cve-neighborstool and CLI subcommand that discovers other CVEs affecting the same product or package as a given CVE — the "neighborhood" of vulnerabilities you should patch together.Motivation
When triaging or patching a single CVE in a library, you often want to know: are there other CVEs I should fix at the same time? Currently, users must manually search NVD or jump between tools. This tool automates that workflow.
How it works
Usage
Example output
Implementation details
src/manus_agent/tools/get_cve_neighbors.py_SUBCOMMANDSset and dispatch block incli.pyget_nvd_dataconventions (exponential back-off, respectsNVD_API_KEY,NVD_MAX_RETRIES,NVD_RETRY_BASE_DELAY)Test coverage (51 tests)
All tests fully mocked — no real network access. Full suite passes: 1209 tests total.
Checklist
get_cve_neighbors.pymanus-agent cve-neighborstool_output_logger, argparse patterns)