Skip to content

Commit 36ce5e1

Browse files
committed
Use correct regex for CVE
Per the CVE JSON schema we had not the correct regex. Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent b7a7237 commit 36ce5e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vulnerabilities/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
logger = logging.getLogger(__name__)
4444

45-
cve_regex = re.compile(r"CVE-\d{4}-\d{4,7}", re.IGNORECASE)
45+
cve_regex = re.compile(r"CVE-[0-9]{4}-[0-9]{4,19}", re.IGNORECASE)
4646
is_cve = cve_regex.match
4747
find_all_cve = cve_regex.findall
4848

0 commit comments

Comments
 (0)