Skip to content

API Reference parrot_tools.security.cve.toolkit

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.security.cve.toolkit

View source

CVE lookup, package advisory search and advisory download — OSV + NVD 2.0 + EPSS (FEAT-778 M12).

Alias AffectedPackage

Re-exported from parrot_tools.security.cve.models.AffectedPackage.

Alias CVENotFoundError

Re-exported from parrot_tools.security.cve.models.CVENotFoundError.

Alias CVERecord

Re-exported from parrot_tools.security.cve.models.CVERecord.

Class CVEResponseError

A provider body was oversized, not JSON, or not shaped as expected.

It is also a ValueError so the optional NVD/EPSS enrichment paths, which already degrade on ValueError, treat a bad body like any other provider failure.

Alias CVESearchResult

Re-exported from parrot_tools.security.cve.models.CVESearchResult.

Class CVEToolkit

Look up CVEs, search advisories for a package version, and download an advisory into expert knowledge.

Parameter Type Default Description
store_resolver Callable[[str], BaseWikiStore] | None None Maps a wiki name to its store (needed by download_cve).
sources_dir Path | None None Confined directory for raw JSON downloads.
nvd_api_key str | None None NVD API key; falls back to NVD_API_KEY.
enrich_nvd bool True Enrich OSV records with NVD 2.0 data.
enrich_epss bool False Add the EPSS probability.
timeout_seconds float 20.0 Total HTTP timeout per request.
max_response_bytes int MAX_RESPONSE_BYTES Largest provider response body accepted.
**kwargs Any {} Forwarded to AbstractToolkit.

Attributes:

Attribute Type Description
auto_open bool

Method CVEToolkit.lookup_cve

Look up one CVE by id (e.g. CVE-2026-98432): severity, CVSS, CWE, affected packages and fixed versions, references.

lookup_cve(cve_id: str) -> dict[str, Any]

Parameter Type Default Description
cve_id str

Returns: dict[str, Any]

Method CVEToolkit.search_cves

List known CVEs for a package (ecosystem: PyPI, npm, crates.io, Go, Maven, …), optionally for one version.

search_cves(package: str, ecosystem: str, version: str | None = None, limit: int = 20) -> dict[str, Any]

Parameter Type Default Description
package str
ecosystem str
version str | None None
limit int 20

Returns: dict[str, Any]

Method CVEToolkit.download_cve

Download a CVE advisory into your knowledge (wiki) so later answers can cite it.

download_cve(cve_id: str, wiki_name: str | None = None) -> dict[str, Any]

Parameter Type Default Description
cve_id str
wiki_name str | None None

Returns: dict[str, Any]

Alias CVEToolkitError

Re-exported from parrot_tools.security.cve.models.CVEToolkitError.

Alias CVE_ID_RE

Re-exported from parrot_tools.security.cve.models.CVE_ID_RE.

Alias CVSS

Re-exported from parrot_tools.security.cve.models.CVSS.

Alias DownloadReceipt

Re-exported from parrot_tools.security.cve.models.DownloadReceipt.

Attribute EPSS_URL

Type: Final[str]

Attribute MAX_RESPONSE_BYTES

Type: Final[int]

Attribute NVD_CVE_URL

Type: Final[str]

Alias OSV_ECOSYSTEMS

Re-exported from parrot_tools.security.cve.models.OSV_ECOSYSTEMS.

Attribute OSV_QUERY_URL

Type: Final[str]

Attribute OSV_VULN_URL

Type: Final[str]

Alias cvss3_base_score

Re-exported from parrot_tools.security.cve.models.cvss3_base_score.

Alias severity_from_score

Re-exported from parrot_tools.security.cve.models.severity_from_score.

Alias validate_cve_id

Re-exported from parrot_tools.security.cve.models.validate_cve_id.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally