From 8bc179e0cd95be2a54340759a7cba8b5311cc360 Mon Sep 17 00:00:00 2001 From: athu-tran <63068972+athu-tran@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:27:45 -0500 Subject: [PATCH 1/3] #3394 update comment --- src/stores/cveListSearch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/cveListSearch.js b/src/stores/cveListSearch.js index 16a9e059..5d4fc997 100644 --- a/src/stores/cveListSearch.js +++ b/src/stores/cveListSearch.js @@ -89,7 +89,7 @@ export const useCveListSearchStore = defineStore('cveListSearch ', { } } catch (error) { - // if record is not found, find potential reserved ID + // if record is not found, find potential reserved/rejected ID if (this.isCveIdPattern() && Object.keys(this.recordData).length === 0) { await this.getIdData(); } From a54ddeac3e3f041763dfe5cb9ec13c06cddf0704 Mon Sep 17 00:00:00 2001 From: athu-tran <63068972+athu-tran@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:38:45 -0500 Subject: [PATCH 2/3] #3394 fix rejected CVE ID with a record case where getting record description failed --- src/stores/cveListSearch.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/stores/cveListSearch.js b/src/stores/cveListSearch.js index 5d4fc997..5b0ecf3c 100644 --- a/src/stores/cveListSearch.js +++ b/src/stores/cveListSearch.js @@ -111,10 +111,8 @@ export const useCveListSearchStore = defineStore('cveListSearch ', { this.isIdOrRecordFound = true; // format description - let descriptions = []; - cveRecordData.containers?.cna?.descriptions.forEach((description) => { - if (this.isEnglishLanguage(description.lang)) descriptions.push(this.processShowMoreShowLessDescription(description.value)); - }); + let descriptions = this.processDescriptionsField(cveRecordData); + let recordDataSummary = { cveId: cveRecordData?.cveMetadata?.cveId || 'No ID provided', cna: cveRecordData?.containers?.cna?.providerMetadata?.shortName || 'No CNA provided', @@ -131,6 +129,7 @@ export const useCveListSearchStore = defineStore('cveListSearch ', { } } catch (error) { + debugger this.isLookUpRecordServerError = true; this.isPublished = false; @@ -196,7 +195,7 @@ export const useCveListSearchStore = defineStore('cveListSearch ', { cveId: result._id, cna: result?._source?.containers?.cna?.providerMetadata?.shortName || 'No CNA provided', cnaOrgId: result?._source?.containers?.cna?.providerMetadata?.orgId || '', - descriptions: this.processDescriptionsField(result), + descriptions: this.processDescriptionsField(result?._source), relevancyScore: result?._score }); }); @@ -205,17 +204,17 @@ export const useCveListSearchStore = defineStore('cveListSearch ', { this.searchResults = parsedResults; }, - processDescriptionsField(result){ + processDescriptionsField(recordData){ let descriptions = []; - if (result?._source?.cveMetadata?.state === "PUBLISHED") { - result?._source?.containers?.cna?.descriptions.forEach((description) => { + if (recordData.cveMetadata?.state === "PUBLISHED") { + recordData.containers?.cna?.descriptions.forEach((description) => { if (this.isEnglishLanguage(description.lang)) descriptions.push(this.processShowMoreShowLessDescription(description.value)); }); - } else if (result?._source?.cveMetadata?.state === "REJECTED") { - result?._source?.containers?.cna?.rejectedReasons.forEach((rejectedReason) => { + } else if (recordData.cveMetadata?.state === "REJECTED") { + recordData.containers?.cna?.rejectedReasons.forEach((rejectedReason) => { if (this.isEnglishLanguage(rejectedReason.lang)) descriptions.push(this.processShowMoreShowLessDescription(rejectedReason.value)); }); - } else { + } else { // resevered/rejected ID w/o a CVE record does not have description, and that logic is handled in corresponding Vue file descriptions.push('No description provided'); } From 99cc29aa5a0d5454fcf5c3b793710e06339e69a6 Mon Sep 17 00:00:00 2001 From: athu-tran <63068972+athu-tran@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:04:33 -0500 Subject: [PATCH 3/3] #3394 move Search Results as page title and for CVE ID found cases: show assigner and description on Search Results page and relabel Search Results as Other Results --- src/stores/cveListSearch.js | 1 - src/views/CVERecord/SearchResults.vue | 35 ++++++++++++++++++++------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/stores/cveListSearch.js b/src/stores/cveListSearch.js index 5b0ecf3c..23c7b21e 100644 --- a/src/stores/cveListSearch.js +++ b/src/stores/cveListSearch.js @@ -129,7 +129,6 @@ export const useCveListSearchStore = defineStore('cveListSearch ', { } } catch (error) { - debugger this.isLookUpRecordServerError = true; this.isPublished = false; diff --git a/src/views/CVERecord/SearchResults.vue b/src/views/CVERecord/SearchResults.vue index ac3ab617..599af22c 100644 --- a/src/views/CVERecord/SearchResults.vue +++ b/src/views/CVERecord/SearchResults.vue @@ -34,17 +34,18 @@
You are accessing Production data from {{ resultUrl }}
+
View the CVE {{ getRecordOrIdLabel }} below.
The
+
CNA: - {{ partnerStore.partnerShortLongNameMap[cveListSearchStore.recordData.cnaOrgId] ? partnerStore.partnerShortLongNameMap[cveListSearchStore.recordData.cnaOrgId] : cveListSearchStore.recordData.cna }}
+ {{ partnerStore.partnerShortLongNameMap[cveListSearchStore.recordData.cnaOrgId] ? partnerStore.partnerShortLongNameMap[cveListSearchStore.recordData.cnaOrgId] : cveListSearchStore.recordData.cna }} + ++ Assigner: + {{ cveListSearchStore.idData.owning_cna }} + No assigner provided +
{{ description.firstChunk }}... @@ -79,12 +86,22 @@
+ This CVE ID was unused by the
+ This ID has been reserved by a
Includes all record(s) that reference this CVE ID.