Skip to content

Commit

Permalink
fix: use USNs directly from the CVE response
Browse files Browse the repository at this point in the history
We need to fetch the USNs related to a CVE to extract the ubuntu
version of the packages affected by the CVE. In the past, we
where running another request to fetch all USNs related to the CVEs.
To make this process less demanding on the API side, we are now
relaying on the related USNs already delivered by the CVE endpoint
instead
  • Loading branch information
lucasmoura authored and renanrodrigo committed Oct 14, 2024
1 parent fad2ab3 commit a7c7de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uaclient/api/u/pro/security/fix/_common/plan/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def _get_cve_data(
) -> Tuple[CVE, List[USN]]:
try:
cve = client.get_cve(cve_id=issue_id)
usns = client.get_notices(cves=issue_id)
usns = cve.notices
except exceptions.SecurityAPIError as e:
if e.code == 404:
raise exceptions.SecurityIssueNotFound(issue_id=issue_id)
Expand Down

0 comments on commit a7c7de8

Please sign in to comment.