swh.vulns.storage.interface module#
- class swh.vulns.storage.interface.VulnerabilitiesStorageInterface(*args, **kwargs)[source]#
Bases:
ProtocolStorage interface to add and get vulnerability data
- osv_vulnerability_report_add(vulnerability_id: str, processing_date: datetime, json_report: Dict[str, Any])[source]#
Add last processing date for an OSV vulnerability report and the full JSON report.
- osv_vulnerability_report_last_processing_date(vulnerability_id: str) datetime | None[source]#
Get the last processing data for an OSV vulnerability report.
- osv_vulnerability_report_get(vulnerability_id: str) Dict[str, Any] | None[source]#
Get full JSON report of an OSV vulnerability event.
- osv_vulnerability_event_add(vulnerabilities_events: List[OSVVulnerabilityEvent])[source]#
Add OSV vulnerability events in storage.
- osv_vulnerability_event_get_by_id(vulnerabilities_ids: List[str]) List[OSVVulnerabilityEvent][source]#
Get vulnerability events for a given OSV vulnerability.