Skip to content

Commit

Permalink
Refs 3656: list cves in template errata (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
xbhouse authored May 30, 2024
1 parent 2fb213f commit 4840e64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/tangy/rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type ErrataListItem struct {
Type string
Severity string
RebootSuggested bool
CVEs []string
}
type PageOptions struct {
Offset int
Expand Down Expand Up @@ -305,7 +306,11 @@ func (t *tangyImpl) RpmRepositoryVersionErrataList(ctx context.Context, hrefs []
return nil, 0, err
}

queryOpen := `SELECT re.content_ptr_id as id, re.id as ErrataId, re.title, re.summary, re.description, re.issued_date as IssuedDate, re.updated_date as UpdatedDate, re.type, re.severity, re.reboot_suggested as RebootSuggested
queryOpen := `SELECT re.content_ptr_id as id, re.id as ErrataId, re.title, re.summary, re.description, re.issued_date as IssuedDate, re.updated_date as UpdatedDate, re.type, re.severity, re.reboot_suggested as RebootSuggested,
(SELECT ARRAY_AGG(ru.ref_id)
FROM rpm_updatereference ru
WHERE ru.update_record_id = re.content_ptr_id
AND ru.ref_type = 'cve') AS CVEs
FROM rpm_updaterecord re WHERE re.content_ptr_id IN `

args["limit"] = pageOpts.Limit
Expand Down

0 comments on commit 4840e64

Please sign in to comment.