From eb84da9e62ef2751e678348884b4a83dbc5421aa Mon Sep 17 00:00:00 2001
From: Ben Limmer
+ New CVEs in {repos.length === 1 ? 'this repo' : 'these repos'} will not appear in this report. +
+| {repo} | +
{empty}
diff --git a/src/report/web/acts/RiskStory.tsx b/src/report/web/acts/RiskStory.tsx index 3886cf3..1036e67 100644 --- a/src/report/web/acts/RiskStory.tsx +++ b/src/report/web/acts/RiskStory.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useEmbeddedData } from '../data/EmbeddedDataContext.tsx'; +import { useAssumptionsDisclosure } from '../hooks/useAssumptionsDisclosure.tsx'; import { Citation } from '../primitives/Citation.tsx'; -import { FootnoteReference } from '../primitives/FootnoteReference.tsx'; import { SEGMENTS, StackedBar } from '../primitives/StackedBar.tsx'; export const riskStoryTestIds = { @@ -12,6 +12,7 @@ export const riskStoryTestIds = { topReposTable: 'risk-story-top-repos-table', topReposToggle: 'risk-story-top-repos-toggle', disabledAlertsWarning: 'risk-story-disabled-alerts-warning', + disabledAlertsLink: 'risk-story-disabled-alerts-link', } as const; export const riskStoryCopy = { @@ -25,10 +26,7 @@ export const reposWithoutSecurityAlertsId = 'repos-without-security-alerts'; export function RiskStory() { const { cve, orgOverview } = useEmbeddedData(); - const disabledAlertsNote = - cve.reposWithSecurityAlertsDisabled.length > 0 - ? `Repos without security alerts enabled: ${cve.reposWithSecurityAlertsDisabled.join(', ')}. New CVEs in these repos will not appear in this report.` - : 'These repos returned a not-enabled response for Dependabot security alerts, so new CVEs in them will not appear in this report.'; + const { reveal } = useAssumptionsDisclosure(); if (cve.status === 'scope-missing') { return ( @@ -136,14 +134,18 @@ export function RiskStory() { {cve.reposWithSecurityAlertsDisabled.length} {' '} of your {orgOverview.repoCount} repos{' '} - {cve.reposWithSecurityAlertsDisabled.length === 1 ? 'does' : 'do'} not have Dependabot security alerts enabled -