Skip to content

Commit

Permalink
testing modification of CPE
Browse files Browse the repository at this point in the history
  • Loading branch information
sudesh0sudesh authored and sudesh0sudesh committed Apr 10, 2024
1 parent f96d92b commit 12ff3c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion opencve/checks/cpes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ def execute(self):
if payload["added"] or payload["removed"]:

# Change the CVE's vendors attribute
vendors_products = convert_cpes(self.cve_json.get("configurations", {}))

#changed code by sudesh to fix the issue of stopping cpe data refresh if cpe data is not present in cve_json
cpe_data=self.cve_json.get("configurations", {})
if len(cpe_data) == 0:
self.cve_json["configurations"] = self.cve_obj.json.get("configurations")

vendors_products = convert_cpes(self.cve_json.get("configurations", {}))
self.cve_obj.vendors = flatten_vendors(vendors_products)
db.session.commit()

Expand Down

0 comments on commit 12ff3c4

Please sign in to comment.