Skip to content

Commit 2fb6d0d

Browse files
committed
remove dead code
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent 3d5114c commit 2fb6d0d

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

vulnerabilities/models.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -267,51 +267,11 @@ def as_cyclonedx(self, affected_instances, analysis=None):
267267
url=self.resource_url,
268268
)
269269

270-
# references = []
271-
# ratings = []
272-
# for reference in self.references:
273-
# reference_source = cdx_vulnerability.VulnerabilitySource(
274-
# url=reference.get("reference_url"),
275-
# )
276-
# references.append(
277-
# cdx_vulnerability.VulnerabilityReference(
278-
# id=reference.get("reference_id"),
279-
# source=reference_source,
280-
# )
281-
# )
282-
283-
# for score_entry in reference.get("scores", []):
284-
# # CycloneDX only support a float value for the score field,
285-
# # where on the VulnerableCode data it can be either a score float value
286-
# # or a severity string value.
287-
# score_value = score_entry.get("value")
288-
# try:
289-
# score = decimal.Decimal(score_value)
290-
# severity = None
291-
# except decimal.DecimalException:
292-
# score = None
293-
# severity = getattr(
294-
# cdx_vulnerability.VulnerabilitySeverity,
295-
# score_value.upper(),
296-
# None,
297-
# )
298-
299-
# ratings.append(
300-
# cdx_vulnerability.VulnerabilityRating(
301-
# source=reference_source,
302-
# score=score,
303-
# severity=severity,
304-
# vector=score_entry.get("scoring_elements"),
305-
# )
306-
# )
307-
308270
return cdx_vulnerability.Vulnerability(
309271
id=self.advisory_id,
310272
source=source,
311273
description=self.summary,
312274
affects=affects,
313-
# references=sorted(references),
314-
# ratings=ratings,
315275
analysis=analysis,
316276
)
317277

0 commit comments

Comments
 (0)