Skip to content

Commit

Permalink
feat: add link to title and to json (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito authored Mar 19, 2024
1 parent a0867a1 commit 2d4fced
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/prepare_security.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ class PrepareSecurityRelease {

for (const report of reports.data) {
const { id, attributes: { title, cve_ids }, relationships: { severity } } = report;
const link = `https://hackerone.com/reports/${id}`;
const reportLevel = severity ? severity.data.attributes.rating : 'TBD';
cli.separator();
cli.info(`Report: ${id} - ${title} (${reportLevel})`);
cli.info(`Report: ${link} - ${title} (${reportLevel})`);
const include = await cli.prompt(
'Would you like to include this report to the next security release?',
{ defaultAnswer: true });
Expand All @@ -182,7 +183,8 @@ class PrepareSecurityRelease {
cve_ids,
severity: reportLevel,
summary: summaryContent ?? '',
affectedVersions: versions.split(',').map((v) => v.replace('v', '').trim())
affectedVersions: versions.split(',').map((v) => v.replace('v', '').trim()),
link
});
}
return selectedReports;
Expand Down

0 comments on commit 2d4fced

Please sign in to comment.