diff --git a/requirements.txt b/requirements.txt index 124cd29e6..712b902fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ ptyprocess==0.6.0 py==1.8.0 pycodestyle==2.5.0 pycparser==2.20 -pygit2==1.2.0 +pygit2==1.5.0 Pygments==2.6.1 pyparsing==2.4.5 pytest==5.3.2 @@ -43,7 +43,7 @@ pytest-django==3.7.0 pytest-mock==1.13.0 python-dateutil==2.8.1 pytz==2019.3 -schema==0.7.1 +schema==0.7.4 six==1.13.0 soupsieve==1.9.5 sqlparse==0.3.0 diff --git a/vulnerabilities/importers/alpine_linux.py b/vulnerabilities/importers/alpine_linux.py index a3855303f..ba3babb63 100644 --- a/vulnerabilities/importers/alpine_linux.py +++ b/vulnerabilities/importers/alpine_linux.py @@ -20,6 +20,7 @@ # for any legal advice. # VulnerableCode is a free software code scanning tool from nexB Inc. and others. # Visit https://github.com/nexB/vulnerablecode/ for support and download. +from re import IGNORECASE from typing import Any from typing import Iterable from typing import List @@ -54,7 +55,7 @@ def validate_schema(advisory_dict): str: Or( [ Or( - Regex(r"CVE.\d+-\d+"), + Regex(r"CVE.\d+-\d+", flags=IGNORECASE), Regex(r"XSA-\d{3}"), Regex(r"ZBX-\d{4}"), Regex(r"wnpa-sec-\d{4}-\d{2}"), @@ -187,7 +188,7 @@ def _load_advisories( impacted_package_urls=[], resolved_package_urls=resolved_purls, vuln_references=references, - cve_id=vuln_ids[0] if vuln_ids[0] != "CVE-????-?????" else None, + cve_id=vuln_ids[0].upper() if vuln_ids[0] != "CVE-????-?????" else None, ) )