File tree Expand file tree Collapse file tree
vulnerabilities/importers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020# for any legal advice.
2121# VulnerableCode is a free software code scanning tool from nexB Inc. and others.
2222# Visit https://github.com/nexB/vulnerablecode/ for support and download.
23+ from re import IGNORECASE
2324from typing import Any
2425from typing import Iterable
2526from typing import List
@@ -54,7 +55,7 @@ def validate_schema(advisory_dict):
5455 str : Or (
5556 [
5657 Or (
57- Regex (r"CVE.\d+-\d+" ),
58+ Regex (r"CVE.\d+-\d+" , flags = IGNORECASE ),
5859 Regex (r"XSA-\d{3}" ),
5960 Regex (r"ZBX-\d{4}" ),
6061 Regex (r"wnpa-sec-\d{4}-\d{2}" ),
@@ -187,7 +188,7 @@ def _load_advisories(
187188 impacted_package_urls = [],
188189 resolved_package_urls = resolved_purls ,
189190 vuln_references = references ,
190- cve_id = vuln_ids [0 ] if vuln_ids [0 ] != "CVE-????-?????" else None ,
191+ cve_id = vuln_ids [0 ]. upper () if vuln_ids [0 ] != "CVE-????-?????" else None ,
191192 )
192193 )
193194
You can’t perform that action at this time.
0 commit comments