feat(tools): classify-refs — NVD reference URL classifier with 89 tests - #166
Open
manus-use wants to merge 1 commit into
Open
feat(tools): classify-refs — NVD reference URL classifier with 89 tests#166manus-use wants to merge 1 commit into
manus-use wants to merge 1 commit into
Conversation
…sifier Add a new tool and CLI subcommand that fetches NVD reference URLs for a CVE and classifies each into actionable categories: patch — Fix commit, PR, or release containing the fix advisory — Vendor or coordinator security advisory exploit — Public exploit or PoC code mailing_list — Security mailing list post issue_tracker — Bug tracker issue or pull request discussion vendor_notice — Vendor blog, changelog, or release notes media — News article, blog post, or analysis other — Uncategorized reference Classification uses a 4-tier priority system: 1. Path patterns (GitHub commits, PRs, GHSA, Bugzilla, etc.) 2. Domain heuristics (exploit-db, seclists, cert.org, etc.) 3. NVD-provided tags (Patch, Exploit, Third Party Advisory, etc.) 4. Fallback keyword matching (low confidence) Each classified reference includes confidence level (high/medium/low), extracted source domain, and original NVD tags. CLI usage: manus-agent classify-refs CVE-2024-3094 manus-agent classify-refs CVE-2024-3094 --output json manus-agent classify-refs CVE-2024-3094 --category patch Also usable as a Strands tool (classify_references) for agentic workflows. Test suite: 89 tests covering URL classification logic, pipeline integration, Strands tool interface, CLI parser and execution, and edge cases. All tests 100% mocked — no real HTTP calls.
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
New tool and CLI subcommand that fetches NVD reference URLs for a CVE and classifies each into actionable categories for triage workflows.
Motivation
During vulnerability triage, analysts need to quickly identify which NVD references contain actionable patch information vs. background reading. Currently this requires manually inspecting each URL. This tool automates the classification using a multi-tier heuristic system.
Features
CLI Subcommand:
classify-refsStrands Tool:
classify_referencesAvailable as an agentic tool for automated workflows — accepts a CVE ID and returns structured classification data.
Categories
patchadvisoryexploitmailing_listissue_trackervendor_noticemediaotherClassification Priority
/commit/,/advisory/,/issues/in pathOutput includes
Tests
89 new tests covering:
All tests 100% mocked — no real HTTP calls.
Files Changed
src/manus_agent/tools/classify_references.py— new tool modulesrc/manus_agent/cli.py—classify-refssubcommand dispatch +_run_classify_refstests/test_classify_references.py— 89 tests