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():