From e9df9a34d4eb229af52520d7a8aced08cc420a44 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 18 Mar 2022 00:39:13 -0400 Subject: dbstore/sql/cisa/search.sql: fix vendor and product names --- dbstore/sql/cisa/search.sql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dbstore/sql/cisa/search.sql b/dbstore/sql/cisa/search.sql index daaf5cf..01db7a5 100644 --- a/dbstore/sql/cisa/search.sql +++ b/dbstore/sql/cisa/search.sql @@ -2,8 +2,8 @@ SELECT COALESCE(json_group_array(json_object( 'vuln_id', a.vuln_id, 'cve_id', c.nvd_id, - 'vendor', b.vendor, - 'product', b.product, + 'vendor', d.name, + 'product', e.name, 'name', b.name, 'added_at', b.added_at, 'action', b.action, @@ -22,5 +22,9 @@ SELECT COALESCE(json_group_array(json_object( ON (b.vuln_id = a.vuln_id) JOIN cisa_vuln_cve_ids c ON (c.vuln_id = b.vuln_id) + JOIN cisa_vendors d + ON (d.vendor_id = b.vendor_id) + JOIN cisa_products e + ON (e.product_id = b.product_id) ORDER BY a.min_rank; -- cgit v1.2.3