From 15a2f0424b324f09cc8a847e67f64b9c97ee1428 Mon Sep 17 00:00:00 2001 From: Ankit-dmc Date: Tue, 1 Dec 2026 18:07:18 +0530 Subject: [PATCH] Use generic_textual for curl severities instead of cvssv3.1 curl rates its advisories Low/Medium/High/Critical on its own scale and states it does not use CVSS, but curl_importer_v2 stored these values under the cvssv3.1 scoring system. Signed-off-by: Ankit-dmc --- vulnerabilities/pipelines/v2_importers/curl_importer.py | 6 ++++-- .../tests/pipelines/v2_importers/test_curl_importer_v2.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vulnerabilities/pipelines/v2_importers/curl_importer.py b/vulnerabilities/pipelines/v2_importers/curl_importer.py index aed5db0a3..1aa56b9bb 100644 --- a/vulnerabilities/pipelines/v2_importers/curl_importer.py +++ b/vulnerabilities/pipelines/v2_importers/curl_importer.py @@ -18,7 +18,7 @@ from vulnerabilities.importer import ReferenceV2 from vulnerabilities.importer import VulnerabilitySeverity from vulnerabilities.pipelines import VulnerableCodeBaseImporterPipelineV2 -from vulnerabilities.severity_systems import SCORING_SYSTEMS +from vulnerabilities.severity_systems import GENERIC from vulnerabilities.utils import fetch_response from vulnerabilities.utils import get_cwe_id from vulnerabilities.utils import get_item @@ -101,8 +101,10 @@ def parse_curl_advisory(raw_data) -> AdvisoryDataV2: references.append(ReferenceV2(url=www_url)) if issue_url: references.append(ReferenceV2(url=issue_url)) + # curl rates issues on its own Low/Medium/High/Critical scale, not with CVSS: + # https://curl.se/dev/vuln-disclosure.html#severity-levels severity = VulnerabilitySeverity( - system=SCORING_SYSTEMS["cvssv3.1"], value=database_specific.get("severity", ""), url=www_url + system=GENERIC, value=database_specific.get("severity", ""), url=www_url ) published = raw_data.get("published", "") diff --git a/vulnerabilities/tests/pipelines/v2_importers/test_curl_importer_v2.py b/vulnerabilities/tests/pipelines/v2_importers/test_curl_importer_v2.py index de8e9d849..918aee02d 100644 --- a/vulnerabilities/tests/pipelines/v2_importers/test_curl_importer_v2.py +++ b/vulnerabilities/tests/pipelines/v2_importers/test_curl_importer_v2.py @@ -87,7 +87,8 @@ def test_collect_advisories(mock_fetch, pipeline): # Severity severity = advisory.severities[0] assert severity.value == "High" - assert severity.system.identifier == "cvssv3.1" + # curl's own textual rating, not a CVSS score + assert severity.system.identifier == "generic_textual" def test_parse_curl_advisory_minimal():