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

Method from_dict

vulnerabilities/importer.py:139–147  ·  view source on GitHub ↗
(cls, ref: dict)

Source from the content-addressed store, hash-verified

137
138 @classmethod
139 def from_dict(cls, ref: dict):
140 return cls(
141 reference_id=str(ref["reference_id"]),
142 reference_type=ref.get("reference_type") or "",
143 url=ref["url"],
144 severities=[
145 VulnerabilitySeverity.from_dict(severity) for severity in ref["severities"]
146 ],
147 )
148
149 @classmethod
150 def from_url(cls, url):

Calls 1

getMethod · 0.45