From 36ce5e1acf6c8efd44ebd4f415ac4def4759282d Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 21 Aug 2024 17:12:54 +0200 Subject: [PATCH] Use correct regex for CVE Per the CVE JSON schema we had not the correct regex. Signed-off-by: Philippe Ombredanne --- vulnerabilities/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vulnerabilities/utils.py b/vulnerabilities/utils.py index c6874b7df..c8a09ad00 100644 --- a/vulnerabilities/utils.py +++ b/vulnerabilities/utils.py @@ -42,7 +42,7 @@ logger = logging.getLogger(__name__) -cve_regex = re.compile(r"CVE-\d{4}-\d{4,7}", re.IGNORECASE) +cve_regex = re.compile(r"CVE-[0-9]{4}-[0-9]{4,19}", re.IGNORECASE) is_cve = cve_regex.match find_all_cve = cve_regex.findall