Skip to content

Commit

Permalink
fix: add created_at value to json
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Mar 14, 2024
1 parent af1c134 commit 5a01d8e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/prepare_security.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ class PrepareSecurityRelease {
const selectedReports = [];

for (const report of reports.data) {
const { id, attributes: { title, cve_ids }, relationships: { severity, weakness } } = report;
const {
id, attributes: { title, cve_ids, created_at },
relationships: { severity, weakness }
} = report;
let reportSeverity = 'TBD';
if (severity?.data?.attributes?.cvss_vector_string) {
const { cvss_vector_string, rating } = severity.data.attributes;
Expand Down Expand Up @@ -216,7 +219,8 @@ class PrepareSecurityRelease {
cve_ids,
severity: reportSeverity,
summary: summaryContent ?? '',
affectedVersions: versions.split(',').map((v) => v.replace('v', '').trim())
affectedVersions: versions.split(',').map((v) => v.replace('v', '').trim()),
created_at // when we request CVE we need to input vulnerability_discovered_at
});
}
return selectedReports;
Expand Down

0 comments on commit 5a01d8e

Please sign in to comment.