Skip to content

Commit d7807e9

Browse files
committed
Add missing CVEs to aliases field for MNDT files
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent 44c7470 commit d7807e9

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

vulnerabilities/pipelines/v2_importers/fireeye_importer_v2.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import re
1111
from pathlib import Path
1212
from typing import Iterable
13-
from typing import List
1413

1514
from fetchcode.vcs import fetch_via_vcs
1615

@@ -23,6 +22,7 @@
2322
from vulnerabilities.utils import create_weaknesses_list
2423
from vulnerabilities.utils import cwe_regex
2524
from vulnerabilities.utils import dedupe
25+
from vulnerabilities.utils import find_all_cve
2626
from vulnerabilities.utils import get_advisory_url
2727

2828
logger = logging.getLogger(__name__)
@@ -99,12 +99,19 @@ def parse_advisory_data(raw_data, file_path, base_path) -> AdvisoryData:
9999
summary = md_dict.get(database_id[1::]) or []
100100
description = md_dict.get("## Description") or []
101101
impact = md_dict.get("## Impact")
102-
cve_ids = md_dict.get("## CVE Reference") or []
102+
cve_refs = md_dict.get("## CVE Reference") or []
103+
cve_ids = md_dict.get("## CVE ID") or []
104+
cleaned_cve_ids = []
105+
for line in cve_ids:
106+
found_cves = find_all_cve(line)
107+
cleaned_cve_ids.extend(found_cves)
108+
103109
references = md_dict.get("## References") or []
104110
cwe_data = md_dict.get("## Common Weakness Enumeration") or []
105111

106112
advisory_id = file_path.stem
107-
aliases = dedupe([cve_id.strip() for cve_id in cve_ids])
113+
aliases = dedupe([cve.strip() for cve in cleaned_cve_ids + cve_refs])
114+
aliases = [aliase for aliase in aliases if aliase != advisory_id]
108115
advisory_url = get_advisory_url(
109116
file=file_path,
110117
base_path=base_path,

vulnerabilities/tests/test_data/fireeye_v2/MNDT-2025-0009-expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"advisory_id": "MNDT-2025-0009",
4-
"aliases": [],
4+
"aliases": ["CVE-2025-64740"],
55
"summary": "Improper verification of cryptographic signature in the installer for Zoom Workplace VDI Client for Windows may allow an authenticated user to conduct an escalation of privilege via local access.",
66
"affected_packages": [],
77
"references_v2": [

0 commit comments

Comments
 (0)