import { useEffect, useMemo, useState } from 'react'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { memberStateName } from '@cra-compliance/types'; import type { Page } from '../App'; import { useLimits } from '../hooks/useAccount'; import { useConfig, externalApiFetch, errorMessage } from '../hooks/useApi'; import { useNotify } from '../hooks/useNotify'; import { copyText, downloadText, slugify } from '../lib/files'; import { dateTime, duration, shortDateTime, titleCase } from '../lib/format'; import { LINKS } from '../content/links'; import { PlanTable } from '../components/PlanTable'; import { ReportingClock } from '../components/ReportingClock'; import type { ClockStage, StageState } from '../components/ReportingClock'; import { ApiErrorNotice, Chip, Cite, Empty, ErrorState, ExternalLink, Notice, PageHead, Panel, Skel } from '../components/ui'; import type { Tone } from '../components/ui'; type IncidentStatus = 'draft' | 'investigating' | 'ready_to_report' | 'reported' | 'closed'; type IncidentPriority = 'critical' | 'high' | 'medium' | 'low'; type IncidentTrack = 'vulnerability' | 'severe_incident'; type DeadlineState = 'ok' | 'warning' | 'overdue'; type NotificationType = 'early_warning' | 'vulnerability_notification' | 'final_report'; type DeadlineBasis = 'fix_available' | 'notification_submitted' | 'estimate'; interface IncidentListItem { id: string; status: IncidentStatus; priority: IncidentPriority; incident_track: IncidentTrack; product_name: string; completeness_score: number; report_deadline_at: string | null; created_at: string; minutes_remaining: number | null; deadline_state: DeadlineState; /** The active stage's date is our estimate, not a legal deadline (final report before its anchor is known). */ deadline_is_estimate?: boolean; early_warning_submitted_at: string | null; vuln_notification_submitted_at: string | null; final_report_submitted_at: string | null; } interface IncidentCase extends IncidentListItem { first_awareness_at: string; early_warning_deadline_at: string | null; vuln_notification_deadline_at: string | null; final_report_deadline_at: string | null; reported_at: string | null; product_version: string; impact_summary: string; mitigation_summary: string; affected_scope: string; contact_name: string; contact_email: string; actively_exploited?: boolean | null; fix_available_at?: string | null; final_report_deadline_basis?: DeadlineBasis; } interface IncidentNotification { id: string; notification_type: NotificationType; submitted_at: string | null; created_at: string; content: Record | null; } interface IncidentAudit { id: string; action: string; field_name: string | null; created_at: string; } interface IncidentDetailResponse { incident: IncidentCase; notifications: IncidentNotification[]; audit_log: IncidentAudit[]; } interface IncidentDraft { product_name: string; product_version: string; contact_name: string; contact_email: string; impact_summary: string; mitigation_summary: string; affected_scope: string; incident_track: IncidentTrack; status: IncidentStatus; fix_available_at: string; } /** Set by the Vulnerabilities page to open the new-incident form for a finding. */ export const NEW_INCIDENT_KEY = 'resicoma_new_incident'; const SELECTED_KEY = 'cra_selected_incident'; const STAGES: NotificationType[] = ['early_warning', 'vulnerability_notification', 'final_report']; const STAGE_NAMES: Record = { early_warning: 'Early warning', vulnerability_notification: 'Notification', final_report: 'Final report', }; const STATUS_LABELS: Record = { draft: 'Draft', investigating: 'Investigating', ready_to_report: 'Ready to report', reported: 'Reported', closed: 'Closed', }; const TRACK_LABELS: Record = { vulnerability: 'Exploited vulnerability', severe_incident: 'Severe incident', }; function guidance(type: NotificationType, track: IncidentTrack): { what: string; cite: string } { const severe = track === 'severe_incident'; if (type === 'early_warning') { return { what: severe ? 'That a severe incident affecting the security of your product has occurred, whether it is suspected to be caused by unlawful or malicious acts, and, where known, the Member States where the product is made available.' : 'That an actively exploited vulnerability exists in your product and, where known, the Member States where the product is made available.', cite: severe ? 'Art. 14(4)(a)' : 'Art. 14(2)(a)', }; } if (type === 'vulnerability_notification') { return { what: severe ? 'General information about the incident, an initial assessment, the corrective or mitigating measures taken and those users can take, and how sensitive the information is.' : 'General information about the product, the nature of the exploit and the vulnerability, the corrective or mitigating measures taken and those users can take, and how sensitive the information is.', cite: severe ? 'Art. 14(4)(b)' : 'Art. 14(2)(b)', }; } return { what: severe ? 'Due within one month of the incident notification: a detailed description of the incident, its severity and impact, the likely cause, and the mitigation measures applied and ongoing.' : 'Due no later than 14 days after a corrective or mitigating measure is available: a description of the vulnerability, its severity and impact, information on any malicious actor where available, and details of the security update or other measures.', cite: severe ? 'Art. 14(4)(c)' : 'Art. 14(2)(c)', }; } export function IncidentCenter({ onNavigate }: { onNavigate: (page: Page) => void }) { const config = useConfig(); if (!config.connected) return ; return ; } function IncidentIntro({ onNavigate }: { onNavigate: (page: Page) => void }) { const stages: [ClockStage, ClockStage, ClockStage] = [ { name: 'Early warning', when: '+24 hours', state: 'static', status: 'Art. 14(2)(a)' }, { name: 'Notification', when: '+72 hours', state: 'static', status: 'Art. 14(2)(b)' }, { name: 'Final report', when: 'Fix + 14 days', state: 'static', status: 'Art. 14(2)(c)' }, ]; return (
onNavigate('settings')}>Connect an account} />

For a severe incident affecting the security of your product, the first two deadlines are the same and the final report is due within one month of the incident notification Art. 14(4). You also need to tell affected users Art. 14(8).

  • Starts a case from a finding on the Vulnerabilities page, or by hand, with the time you became aware.
  • Shows each deadline in your time zone and what is due next.
  • Drafts the early warning, notification and final report from the case details, for you to review and submit.
  • Records when each report was sent and keeps an activity log. Pro adds an evidence export.

You can report directly through ENISA's Single Reporting Platform. The checklist and the incident response plan template cover what to prepare.

Single Reporting Platform
); } interface PendingStart { vulnerability_id?: string; plugin_id?: string; title?: string; } function readPendingStart(): PendingStart | null { try { const raw = window.sessionStorage.getItem(NEW_INCIDENT_KEY); window.sessionStorage.removeItem(NEW_INCIDENT_KEY); return raw ? JSON.parse(raw) as PendingStart : null; } catch { return null; } } /** Statuses that count towards the plan's open-incident limit. The service uses the same rule. */ function countsAsOpen(status: IncidentStatus): boolean { return status !== 'closed' && status !== 'reported'; } function Incidents() { const limits = useLimits(); const queryClient = useQueryClient(); const { confirm, toast, NotifyPortal } = useNotify(); const [pendingStart, setPendingStart] = useState(() => readPendingStart()); const [selectedId, setSelectedIdState] = useState(() => { try { return window.sessionStorage.getItem(SELECTED_KEY); } catch { return null; } }); const [statusFilter, setStatusFilter] = useState<'all' | IncidentStatus>('all'); const [deadlineFilter, setDeadlineFilter] = useState<'all' | DeadlineState>('all'); const [error, setError] = useState(null); const setSelectedId = (id: string | null) => { try { if (id) window.sessionStorage.setItem(SELECTED_KEY, id); else window.sessionStorage.removeItem(SELECTED_KEY); } catch { /* ignore */ } setSelectedIdState(id); }; const incidentsQuery = useQuery({ queryKey: ['incidents'], queryFn: async () => (await externalApiFetch<{ data: IncidentListItem[] }>('/api/dashboard?action=incidents_list')).data ?? [], refetchInterval: 60_000, }); const incidents = incidentsQuery.data ?? []; useEffect(() => { if (!incidentsQuery.isSuccess) return; if (selectedId && !incidents.some((i) => i.id === selectedId)) setSelectedId(incidents[0]?.id ?? null); if (!selectedId && incidents.length > 0) setSelectedId(incidents[0].id); // eslint-disable-next-line react-hooks/exhaustive-deps }, [incidentsQuery.isSuccess, incidents, selectedId]); const start = useMutation({ mutationFn: async ({ track, awareAt, source }) => { const res = await externalApiFetch<{ data: IncidentCase }>('/api/dashboard', { method: 'POST', body: JSON.stringify({ action: 'incidents_start', incident_track: track, first_awareness_at: awareAt, actively_exploited: track === 'vulnerability', ...(source?.vulnerability_id ? { vulnerability_id: source.vulnerability_id } : {}), ...(source?.plugin_id ? { plugin_id: source.plugin_id } : {}), }), }); return res.data; }, onSuccess: async (incident) => { setPendingStart(null); await queryClient.invalidateQueries({ queryKey: ['incidents'] }); void queryClient.invalidateQueries({ queryKey: ['dashboard'] }); setSelectedId(incident.id); toast({ message: 'Incident started. The deadlines are counted from the time you entered.' }); }, onError: (err) => setError(err), }); const remove = useMutation({ mutationFn: async (incidentId) => { await externalApiFetch('/api/dashboard', { method: 'POST', body: JSON.stringify({ action: 'incidents_delete', incident_id: incidentId }) }); }, onSuccess: async (_data, incidentId) => { queryClient.removeQueries({ queryKey: ['incident-detail', incidentId] }); if (selectedId === incidentId) setSelectedId(null); await queryClient.invalidateQueries({ queryKey: ['incidents'] }); void queryClient.invalidateQueries({ queryKey: ['dashboard'] }); toast({ message: 'Incident deleted.' }); }, onError: (err) => setError(err), }); const filtered = incidents.filter((i) => (statusFilter === 'all' || i.status === statusFilter) && (deadlineFilter === 'all' || i.deadline_state === deadlineFilter)); const maxOpen = limits.max_open_incidents; const openCount = incidents.filter((i) => countsAsOpen(i.status)).length; const atLimit = incidentsQuery.isSuccess && Number.isFinite(maxOpen) && openCount >= maxOpen; const limitText = maxOpen === 1 ? 'one open incident' : `${maxOpen} open incidents`; const showForm = pendingStart !== null && !atLimit; return (
setPendingStart({})} > New incident )} /> {atLimit && (

Finish reporting the current case or close it to start another, or move to Basic or Pro for unlimited incidents.{' '} Compare plans

)} {error !== null && setError(null)} />} {showForm && ( setPendingStart(null)} onStart={(track, awareAt) => start.mutate({ track, awareAt, source: pendingStart })} /> )} {incidentsQuery.isError ? ( void incidentsQuery.refetch()} /> ) : (
void incidentsQuery.refetch()} disabled={incidentsQuery.isFetching}> {incidentsQuery.isFetching ? 'Refreshing…' : 'Refresh'} } flush > {incidentsQuery.isLoading ? (
{[0, 1, 2].map((i) => )}
) : incidents.length === 0 ? ( Start one when you become aware of an actively exploited vulnerability or a severe incident. ) : ( <>
{filtered.length === 0 ? (

No cases match these filters.

) : (
    {filtered.map((incident) => (
  • ))}
)} )}
{selectedId ? ( { const ok = await confirm({ title: 'Delete this incident?', message: 'The case, its drafts and its activity log are removed permanently. Reports you already submitted are not affected.', confirmLabel: 'Delete incident', danger: true, }); if (ok) remove.mutate(selectedId); }} onToast={toast} /> ) : incidentsQuery.isLoading ? (
{[0, 1, 2].map((i) => )}
) : ( Choose a case on the left, or start a new incident. )}
)}
); } function toLocalInput(date: Date): string { const pad = (n: number) => String(n).padStart(2, '0'); return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`; } function StartForm({ source, busy, onCancel, onStart }: { source: PendingStart | null; busy: boolean; onCancel: () => void; onStart: (track: IncidentTrack, awareAtIso: string) => void; }) { const fromFinding = Boolean(source?.vulnerability_id); const [track, setTrack] = useState('vulnerability'); const [awareAt, setAwareAt] = useState(() => toLocalInput(new Date())); const [error, setError] = useState(null); const submit = () => { const date = new Date(awareAt); if (Number.isNaN(date.getTime())) { setError('Enter the date and time you became aware.'); return; } if (date.getTime() > Date.now() + 60_000) { setError('The time you became aware cannot be in the future.'); return; } setError(null); onStart(fromFinding ? 'vulnerability' : track, date.toISOString()); }; return (
{ e.preventDefault(); submit(); }} noValidate> {!fromFinding && (
What are you reporting?
)}
setAwareAt(e.target.value)} aria-invalid={error ? true : undefined} aria-describedby={error ? 'rwp-aware-error' : 'rwp-aware-help'} /> {error ? {error} : In your time zone. This cannot be changed later.}
); } function DeadlineChip({ incident }: { incident: IncidentListItem }) { if (incident.status === 'closed') return Closed; if (incident.status === 'reported') return Reported; // The final report's date is only an estimate until a fix is available (or, for a // severe incident, the incident notification is sent): never a countdown or "Overdue". if (incident.deadline_is_estimate) { return No legal deadline yet; } if (incident.minutes_remaining === null) { const allSubmitted = Boolean(incident.early_warning_submitted_at && incident.vuln_notification_submitted_at && incident.final_report_submitted_at); return {allSubmitted ? 'All reports submitted' : 'No deadline'}; } if (incident.minutes_remaining < 0 || incident.deadline_state === 'overdue') return Overdue; const tone: Tone = incident.deadline_state === 'warning' ? 'caution' : 'neutral'; return {duration(incident.minutes_remaining)} left; } function stageFor(type: NotificationType, incident: IncidentCase, now: number): ClockStage { const due = type === 'early_warning' ? incident.early_warning_deadline_at : type === 'vulnerability_notification' ? incident.vuln_notification_deadline_at : incident.final_report_deadline_at; const submitted = type === 'early_warning' ? incident.early_warning_submitted_at : type === 'vulnerability_notification' ? incident.vuln_notification_submitted_at : incident.final_report_submitted_at; const severe = incident.incident_track === 'severe_incident'; // An estimated final-report date is not a legal deadline: no countdown, never overdue. const estimate = type === 'final_report' && incident.final_report_deadline_basis === 'estimate'; let state: StageState = 'pending'; let status = ''; if (submitted) { state = 'done'; status = `Submitted ${shortDateTime(submitted)}`; } else if (due && estimate) { status = 'Estimate, no legal deadline yet'; } else if (due) { const minutes = (Date.parse(due) - now) / 60_000; if (minutes < 0) { state = 'overdue'; status = `Overdue by ${duration(-minutes)}`; } else { state = minutes < 6 * 60 ? 'soon' : 'pending'; status = `Due in ${duration(minutes)}`; } } else if (type === 'final_report') { status = severe ? 'One month after the notification' : '14 days after the fix'; } else { status = 'Not scheduled'; } const unscheduled = type === 'final_report' ? (severe ? 'After the notification' : 'Depends on fix') : 'Not set'; return { name: STAGE_NAMES[type], when: due ? `${estimate ? 'About ' : ''}${shortDateTime(due)}` : unscheduled, state, status, }; } function stageDueText(type: NotificationType, incident: IncidentCase, now: number): string { const due = type === 'early_warning' ? incident.early_warning_deadline_at : type === 'vulnerability_notification' ? incident.vuln_notification_deadline_at : incident.final_report_deadline_at; const submitted = type === 'early_warning' ? incident.early_warning_submitted_at : type === 'vulnerability_notification' ? incident.vuln_notification_submitted_at : incident.final_report_submitted_at; const severe = incident.incident_track === 'severe_incident'; const estimate = type === 'final_report' && incident.final_report_deadline_basis === 'estimate'; if (submitted) { // An estimated date was never a deadline, so it is not quoted as one. return due && !estimate ? `Submitted ${dateTime(submitted)}. It was due ${dateTime(due)}.` : `Submitted ${dateTime(submitted)}.`; } if (!due) { if (type !== 'final_report') return 'No deadline set.'; return severe ? 'Due one month after the incident notification.' : 'Due no later than 14 days after a fix or mitigation is available.'; } if (estimate) { return severe ? `Estimated ${dateTime(due)}. The final report is due one month after you submit the incident notification.` : `Estimated ${dateTime(due)}. The final report is due no later than 14 days after a fix or mitigation is available; record that date below to set the deadline.`; } const minutes = (Date.parse(due) - now) / 60_000; return minutes < 0 ? `Was due ${dateTime(due)}, ${duration(-minutes)} ago.` : `Due ${dateTime(due)}, in ${duration(minutes)}.`; } function draftFrom(incident: IncidentCase): IncidentDraft { return { product_name: incident.product_name || '', product_version: incident.product_version || '', contact_name: incident.contact_name || '', contact_email: incident.contact_email || '', impact_summary: incident.impact_summary || '', mitigation_summary: incident.mitigation_summary || '', affected_scope: incident.affected_scope || '', incident_track: incident.incident_track || 'vulnerability', status: incident.status || 'draft', fix_available_at: incident.fix_available_at ? toLocalInput(new Date(incident.fix_available_at)) : '', }; } function CaseDetail({ incidentId, isPro, deleting, onError, onDelete, onToast }: { incidentId: string; isPro: boolean; deleting: boolean; onError: (error: unknown) => void; onDelete: () => void; onToast: (options: { message: string; type?: 'success' | 'error' | 'info' }) => void; }) { const queryClient = useQueryClient(); const [draft, setDraft] = useState(null); const [dirty, setDirty] = useState(false); const [openDraft, setOpenDraft] = useState(null); /** The report whose "Record as submitted" form is open. */ const [recording, setRecording] = useState(null); const [now, setNow] = useState(() => Date.now()); useEffect(() => { const id = window.setInterval(() => setNow(Date.now()), 60_000); return () => window.clearInterval(id); }, []); const detail = useQuery({ queryKey: ['incident-detail', incidentId], queryFn: async () => (await externalApiFetch<{ data: IncidentDetailResponse }>( `/api/dashboard?action=incidents_detail&incident_id=${encodeURIComponent(incidentId)}`, )).data, }); const incident = detail.data?.incident; useEffect(() => { if (incident && !dirty) setDraft(draftFrom(incident)); // eslint-disable-next-line react-hooks/exhaustive-deps }, [incident]); const invalidate = async () => { await Promise.all([ queryClient.invalidateQueries({ queryKey: ['incidents'] }), queryClient.invalidateQueries({ queryKey: ['incident-detail', incidentId] }), queryClient.invalidateQueries({ queryKey: ['dashboard'] }), ]); }; const emailError = draft?.contact_email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(draft.contact_email.trim()) ? 'Enter an email address, such as security@example.com.' : null; const fixError = (() => { if (!draft?.fix_available_at) return null; const time = new Date(draft.fix_available_at).getTime(); if (Number.isNaN(time)) return 'Enter a date and time.'; if (time > Date.now() + 60_000) return 'This cannot be in the future.'; return null; })(); const save = useMutation({ mutationFn: async () => { if (!draft || !incident) throw new Error('No incident selected.'); const { fix_available_at, contact_email, ...rest } = draft; const updates: Record = { ...rest }; if (contact_email.trim()) updates.contact_email = contact_email.trim(); const originalFix = incident.fix_available_at ? toLocalInput(new Date(incident.fix_available_at)) : ''; if (fix_available_at !== originalFix) { updates.fix_available_at = fix_available_at ? new Date(fix_available_at).toISOString() : null; } await externalApiFetch('/api/dashboard', { method: 'POST', body: JSON.stringify({ action: 'incidents_save_step', incident_id: incidentId, updates }), }); }, onSuccess: async () => { setDirty(false); await invalidate(); onToast({ message: 'Incident saved.' }); }, onError: (err) => onError(err), }); const generate = useMutation({ mutationFn: async (type) => { await externalApiFetch('/api/dashboard', { method: 'POST', body: JSON.stringify({ action: 'incidents_generate_notification', incident_id: incidentId, notification_type: type }), }); }, onSuccess: async (_data, type) => { setOpenDraft(type); await queryClient.invalidateQueries({ queryKey: ['incident-detail', incidentId] }); }, onError: (err) => onError(err), }); const markSubmitted = useMutation({ mutationFn: async ({ type, submitted_at, external_reference }) => { await externalApiFetch('/api/dashboard', { method: 'POST', body: JSON.stringify({ action: 'incidents_mark_submitted', incident_id: incidentId, notification_type: type, channel: 'portal', submitted_at, external_reference, }), }); }, onSuccess: async (_data, { type }) => { setRecording(null); await invalidate(); onToast({ message: `${STAGE_NAMES[type]} recorded as submitted.` }); }, onError: (err) => onError(err), }); const exportEvidence = useMutation({ mutationFn: async () => (await externalApiFetch<{ data: unknown }>('/api/dashboard', { method: 'POST', body: JSON.stringify({ action: 'incidents_export', incident_id: incidentId }), })).data, onSuccess: (data) => { const name = slugify(incident?.product_name || 'incident', 'incident'); downloadText(JSON.stringify(data, null, 2), `cra-incident-${name}-${new Date().toISOString().slice(0, 10)}.json`, 'application/json'); }, onError: (err) => onError(err), }); const notifications = detail.data?.notifications ?? []; const audit = detail.data?.audit_log ?? []; const busy = save.isPending || generate.isPending || markSubmitted.isPending || exportEvidence.isPending || deleting; const drafts = useMemo(() => { const at = (n: IncidentNotification) => Date.parse(String(n.content?.generated_at ?? n.created_at ?? '')) || 0; const map: Partial> = {}; // Newest first, so the newest draft for each report is the one kept. for (const n of [...notifications].sort((a, b) => at(b) - at(a))) { if (n.content && !map[n.notification_type]) map[n.notification_type] = formatDraft(n.notification_type, n.content); } return map; }, [notifications]); if (detail.isLoading || (!incident && !detail.isError)) { return
{[0, 1, 2, 3].map((i) => )}
; } if (detail.isError || !incident || !draft) { return void detail.refetch()} />; } const track = incident.incident_track || 'vulnerability'; const stages = STAGES.map((type) => stageFor(type, incident, now)) as [ClockStage, ClockStage, ClockStage]; const setField = (key: K, value: IncidentDraft[K]) => { setDraft((current) => (current ? { ...current, [key]: value } : current)); setDirty(true); }; return ( <> {STATUS_LABELS[incident.status] ?? titleCase(incident.status)} {isPro ? ( ) : ( )} } > {track === 'vulnerability' && !incident.final_report_submitted_at && incident.final_report_deadline_basis !== 'fix_available' && (

The final report is due no later than 14 days after a fix or mitigation is available. Record that date below to set the deadline.

)}
{ e.preventDefault(); if (!emailError && !fixError) save.mutate(); }} noValidate>
setField('product_name', v)} placeholder="Your plugin or theme" /> setField('product_version', v)} placeholder="1.3.0 to 1.4.2" mono />
{draft.incident_track === 'vulnerability' && (
setField('fix_available_at', e.target.value)} aria-invalid={fixError ? true : undefined} aria-describedby={fixError ? 'rwp-fix-error' : 'rwp-fix-help'} /> {fixError ? {fixError} : Sets the final report deadline Art. 14(2)(c)}
)}
setField('contact_name', v)} placeholder="Who the CSIRT should contact" />
setField('contact_email', e.target.value)} placeholder="security@example.com" aria-invalid={emailError ? true : undefined} aria-describedby={emailError ? 'rwp-email-error' : undefined} /> {emailError && {emailError}}
setField('impact_summary', v)} placeholder="The vulnerability or incident, how it is being exploited, and what an attacker can do." /> setField('mitigation_summary', v)} placeholder="What you have done, and what users can do until they update." /> setField('affected_scope', v)} placeholder="Approximate number of affected sites and the Member States where the product is available, where known." />
{dirty && ( )} {incident.completeness_score}% of the details filled in
Single Reporting Platform} flush > {STAGES.map((type) => { const stage = stageFor(type, incident, now); const info = guidance(type, track); const submitted = stage.state === 'done'; const draftText = drafts[type]; const isOpenDraft = openDraft === type && draftText; return (

{STAGE_NAMES[type]} {info.cite}

{stageDueText(type, incident, now)}

{submitted ? 'Submitted' : stage.state === 'overdue' ? 'Overdue' : draftText ? 'Draft ready' : 'Not started'}
What to include
{info.what}
{!submitted && (
{draftText && ( )}
)} {!submitted && recording === type && ( markSubmitted.mutate({ type, ...record })} onCancel={() => setRecording(null)} /> )} {isOpenDraft && draftText && (
Draft text. Review every field before you submit it.
{draftText}
)}
); })}

Tell affected users Art. 14(8)

Inform impacted users, and where appropriate all users, about the issue and the measures they can take, in a timely manner. For a WordPress plugin, a changelog entry alone is rarely enough: use an advisory page, email or an admin notice.

Reports reach the CSIRT acting as coordinator in the Member State of your main EU establishment, and ENISA.{' '} CSIRTs network
{audit.length > 0 && (
    {audit.slice(0, 15).map((entry) => (
  • {titleCase(entry.action)}{entry.field_name ? , {entry.field_name.replace(/_/g, ' ')} : null}
  • ))}
{audit.length > 15 &&
{audit.length - 15} older entries are included in the evidence export.
}
)} ); } interface SubmissionRecord { submitted_at: string; external_reference?: string; } /** * Record that a report was sent through ENISA's Single Reporting Platform: * when it was actually sent (not when this button is clicked) and the * platform's reference. Both are evidence an authority may ask for. */ function SubmitForm({ type, track, awarenessAt, busy, onSubmit, onCancel }: { type: NotificationType; track: IncidentTrack; awarenessAt: string; busy: boolean; onSubmit: (record: SubmissionRecord) => void; onCancel: () => void; }) { const [sentAt, setSentAt] = useState(() => toLocalInput(new Date())); const [reference, setReference] = useState(''); const label = type === 'vulnerability_notification' ? (track === 'severe_incident' ? 'incident notification' : 'vulnerability notification') : STAGE_NAMES[type].toLowerCase(); const sentMs = sentAt ? new Date(sentAt).getTime() : NaN; // The input has minute precision: compare with the minute you became aware. const awareMinute = Math.floor(Date.parse(awarenessAt) / 60_000) * 60_000; const problem = Number.isNaN(sentMs) ? 'Enter the date and time you sent it.' : sentMs > Date.now() + 60_000 ? 'This cannot be in the future.' : Number.isFinite(awareMinute) && sentMs < awareMinute ? 'This is before you became aware of the incident.' : null; const awareInput = Number.isFinite(awareMinute) ? toLocalInput(new Date(awareMinute)) : undefined; return (
{ e.preventDefault(); if (problem || busy) return; onSubmit({ submitted_at: new Date(Math.min(sentMs, Date.now())).toISOString(), external_reference: reference.trim() || undefined, }); }} >
Record the {label} as submitted. Enter when you sent it through ENISA's Single Reporting Platform.
setSentAt(e.target.value)} aria-invalid={problem ? true : undefined} aria-describedby={`rwp-sent-${type}-help`} required /> {problem ? {problem} : In your time zone. If you sent it earlier, set that time: it shows whether you met the deadline.}
setReference(e.target.value)} placeholder="The case or submission number" />
{type === 'final_report' && (

This is the last of the three reports. Recording it marks the incident as reported. You cannot undo it here.

)}
); } function TextField({ id, label, value, onChange, placeholder, mono }: { id: string; label: string; value: string; onChange: (value: string) => void; placeholder?: string; mono?: boolean; }) { return (
onChange(e.target.value)} placeholder={placeholder} />
); } function AreaField({ id, label, value, onChange, placeholder, rows }: { id: string; label: string; value: string; onChange: (value: string) => void; placeholder?: string; rows: number; }) { return (