test(tools): comprehensive test suite for search_exploit_db, search_packetstorm, query_threat_intelligence_feeds, obtain_cves - #90
Open
manus-use wants to merge 1 commit into
Conversation
…acketstorm, query_threat_intelligence_feeds, obtain_cves
This was referenced Jul 5, 2026
This was referenced Jul 7, 2026
This was referenced Jul 11, 2026
This was referenced Jul 21, 2026
This was referenced Jul 25, 2026
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
tests/test_exploit_search_tools.py— a comprehensive, fully-mocked test suite covering four tools that previously had zero dedicated test coverage:search_exploit_dbtoolUseIdechosearch_packetstormquery_threat_intelligence_feedsobtain_cves_get_all_cves_from_nvd(single/paginated/empty),_get_all_cves_from_github(single/pagination/error/no-cve-id),_filter_cves_by_epss(pass/block/percentile/empty/missing), tool entry point (merge, dedup, chunking, error handling),_enrich_with_cisa_kevvi_agentwiring)Total: 107 new tests (902 → 1019 passing, 0 failures, 3 pre-existing deselections unchanged).
Why these tools?
These four tools are wired into the core
vi_agentpipeline (manus-agent analyze) and thevd_agentdiscover loop. Despite being actively used in production pipelines, they had no dedicated test file. Any regression in HTML parsing, EPSS filtering, or pagination logic would go completely undetected.Test design
unittest.mock.patchonrequests.get; no real network calls.None, integer type coercion, missing keys, HTTP 4xx/5xx,ConnectionError,Timeout, genericException, empty response bodies, pagination boundary.toolUseIdround-trip echoing.Existing open PRs checked for overlap (none)
#51, #53, #54, #58, #60, #64, #65, #67, #74, #75, #76, #77, #78, #79, #80, #82, #83, #85, #86, #87, #88, #89
No open or merged PR covers
search_exploit_db,search_packetstorm,query_threat_intelligence_feeds, orobtain_cvestest suites.