Skip to content

test(tools): comprehensive test suites for search_exploit_db, search_packetstorm, and get_cwe_details (+125 tests) - #173

Open
manus-use wants to merge 1 commit into
mainfrom
feat/test-exploit-search-tools
Open

test(tools): comprehensive test suites for search_exploit_db, search_packetstorm, and get_cwe_details (+125 tests)#173
manus-use wants to merge 1 commit into
mainfrom
feat/test-exploit-search-tools

Conversation

@manus-use

Copy link
Copy Markdown
Owner

Summary

Adds comprehensive, fully-mocked test suites for three core security tools that previously had zero test coverage:

  • search_exploit_db — Exploit-DB search tool (38 tests)
  • search_packetstorm — Packet Storm Security search tool (41 tests)
  • get_cwe_details — CWE weakness lookup tool (46 tests)

Total: +125 new tests (baseline 1158 → 1283, 0 failures)

What's tested

For each module, the test suite covers:

Category Details
TOOL_SPEC validation Schema structure, required fields, types
Input validation Missing/empty/invalid inputs, type coercion errors
Successful operations Result parsing, HTML extraction, field presence
No results Empty responses, graceful "not found" handling
HTTP errors Connection errors, timeouts, 4xx/5xx status codes
Unexpected exceptions Generic RuntimeError, ValueError catch-all paths
HTML parsing edge cases Malformed entries, missing markers, partial matches
Output logger integration log_tool_output_size called on every code path
Module interface Importability, **kwargs compatibility with Strands SDK

Why these three tools?

These are core security intelligence tools used by VulnerabilityIntelligenceAgent for exploit discovery and weakness classification. A regression in their HTML parsing (Exploit-DB/PacketStorm change their markup periodically) or error handling would go completely undetected without tests.

Checked against open PRs (no overlap)

Confirmed no overlap with any of the 50 open PRs (#123#172):

Test results

1283 passed, 3 deselected, 0 failures
ruff check: All checks passed!

…packetstorm, and get_cwe_details (+125 tests)
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