tools.cisa_kev_tools module
Search CISA’s Known Exploited Vulnerabilities (KEV) catalog.
Uses the official JSON feed from https://www.cisa.gov/known-exploited-vulnerabilities
- async tools.cisa_kev_tools.run(cve_id='', vendor_project='', product='', vulnerability_name='', short_description='', required_action='', notes='', known_ransomware_campaign_use='', cwe='', date_added_on_or_after='', date_added_on_or_before='', due_on_or_after='', due_on_or_before='', field_filters=None, limit=50, force_refresh=False, ctx=None)[source]
Search the CISA Known Exploited Vulnerabilities catalog and return JSON.
The single entry point for the
search_cisa_kev_catalogtool. It validates the request, loads the (cached) KEV feed, applies every supplied filter as a logical AND across the catalog, and returns the matching vulnerability records as a JSON document. Filtering covers exact CVE match, case-insensitive substring matches on the text fields, CWE overlap, inclusive ISO date bounds ondateAddedanddueDate, and an open-endedfield_filtersmap; the result count is capped atlimit(itself clamped toMAX_LIMIT) with atruncatedflag when more matched than were returned.It first checks
field_filtersvia_validate_field_filters(), parses the four date bounds with_parse_iso_date(), then obtains the catalog through_get_catalog()(which serves a process-wide cached copy or, on a miss orforce_refresh, fetches the live feed over HTTPS via_fetch_json()). Per-record matching delegates to_cve_exact()(with_normalize_cve()),_substr_match(),_cwe_match(),_vuln_date_iso(), and_field_filter_value(). The only external side effect is the possible network fetch; thectxargument is unused. Dispatched by the tool loader as the module’srunhandler; not called directly elsewhere.- Parameters:
cve_id (
str) – Exact CVE id (normalized before matching).vendor_project (
str) – Substring filter onvendorProject.product (
str) – Substring filter onproduct.vulnerability_name (
str) – Substring filter onvulnerabilityName.short_description (
str) – Substring filter onshortDescription.required_action (
str) – Substring filter onrequiredAction.notes (
str) – Substring filter onnotes.known_ransomware_campaign_use (
str) – Substring filter onknownRansomwareCampaignUse.cwe (
str) – CWE token matched against the record’scweslist.date_added_on_or_after (
str) – Inclusive lowerdateAddedbound (YYYY-MM-DD).date_added_on_or_before (
str) – Inclusive upperdateAddedbound.due_on_or_after (
str) – Inclusive lowerdueDatebound.due_on_or_before (
str) – Inclusive upperdueDatebound.field_filters (
dict[str,Any] |None) – Extra feed-field filters (keys restricted to_VULN_FIELD_KEYS).limit (
int) – Maximum records to return (clamped to[1, MAX_LIMIT]).force_refresh (
bool) – IfTrue, bypass the cache and refetch the feed.ctx (
ToolContext|None) – Tool context; accepted but unused.
- Returns:
A JSON string with catalog metadata, the total
match_count, atruncatedflag, and the (capped)vulnerabilitieslist; or a JSON error payload when validation fails or the feed cannot be fetched.- Return type: