Skip to content

Commit 2a81756

Browse files
committed
Fix aliases check
Signed-off-by: ziadhany <ziadhany2016@gmail.com>
1 parent 9cd5adc commit 2a81756

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

vulnerabilities/improvers/exploitdb.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ def get_inferences(self, advisory_data) -> Iterable[Inference]:
6262
if not vul:
6363
continue
6464

65-
reference_id = row[11]
66-
67-
if reference_id:
65+
if raw_alias:
6866
url_map = {
6967
"file_url": f"https://gitlab.com/exploit-database/exploitdb/-/blob/main/{row[1]}"
7068
if row[1]
@@ -75,10 +73,11 @@ def get_inferences(self, advisory_data) -> Iterable[Inference]:
7573
for key, url in url_map.items():
7674
if url:
7775
ref, created = VulnerabilityReference.objects.update_or_create(
78-
reference_id=reference_id,
76+
reference_id=row[11],
7977
reference_type=VulnerabilityReference.EXPLOIT,
8078
defaults={"url": url},
8179
)
80+
8281
if created:
8382
VulnerabilityRelatedReference.objects.create(
8483
vulnerability=vul,

0 commit comments

Comments
 (0)