MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / advisory_data

Method advisory_data

vulnerabilities/importers/curl.py:46–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44 return response.json()
45
46 def advisory_data(self) -> Iterable[AdvisoryData]:
47 raw_data = self.fetch()
48 for data in raw_data:
49 cve_id = data.get("aliases") or []
50 cve_id = cve_id[0] if len(cve_id) > 0 else None
51 if not cve_id.startswith("CVE"):
52 package = data.get("database_specific").get("package")
53 logger.error(f"Invalid CVE ID: {cve_id} in package {package}")
54 continue
55 yield parse_advisory_data(data)
56
57
58def parse_advisory_data(raw_data) -> AdvisoryData:

Callers

nothing calls this directly

Calls 3

fetchMethod · 0.95
parse_advisory_dataFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected