/** * The checklist shown in WordPress. Items, article references and wording come * from the shared checklist (checked against docs/cra-facts.md). Item IDs are * stored with saved progress, so they are never changed here. The plugin only * sets category titles in sentence case to match the admin design. */ import { CHECKLIST_DATA } from '@cra-compliance/shared'; import type { ChecklistCategory } from '@cra-compliance/types'; const CATEGORY_TITLES: Record = { scope: 'Scope and role', reporting: 'Reporting', 'risk-assessment': 'Cybersecurity risk assessment', 'secure-development': 'Security requirements', 'vulnerability-handling': 'Vulnerability handling', documentation: 'Technical documentation', conformity: 'Conformity assessment', ongoing: 'Ongoing obligations', }; /** Article reference shown next to the category title. */ export const CATEGORY_CITES: Record = { reporting: 'Art. 14', 'risk-assessment': 'Art. 13(2) to (4)', 'secure-development': 'Annex I, Part I', 'vulnerability-handling': 'Annex I, Part II', documentation: 'Art. 31, Annex VII', conformity: 'Art. 28 to 32', }; /** Categories whose obligations apply now rather than from December 2027. */ export const APPLIES_NOW = new Set(['reporting']); export const CHECKLIST: ChecklistCategory[] = CHECKLIST_DATA.map((category) => ({ ...category, title: CATEGORY_TITLES[category.id] ?? category.title, })); export const CHECKLIST_TOTAL = CHECKLIST.reduce((sum, category) => sum + category.items.length, 0); /** Checklist items that have a matching document template. */ export const ITEM_TEMPLATES: Record = { 'vh-1': { templateId: 'vulnerability-disclosure-policy', label: 'Open the disclosure policy template' }, 'vh-2': { templateId: 'security-txt', label: 'Open the security.txt template' }, 'vh-3': { templateId: 'incident-response-plan', label: 'Open the incident response plan template' }, 'ra-1': { templateId: 'risk-assessment', label: 'Open the risk assessment template' }, 'doc-1': { templateId: 'technical-documentation', label: 'Open the technical documentation template' }, 'doc-2': { templateId: 'sbom', label: 'Open the SBOM template' }, 'doc-3': { templateId: 'support-update-policy', label: 'Open the support policy template' }, 'doc-4': { templateId: 'annex-ii-user-information', label: 'Open the Annex II template' }, 'conf-2': { templateId: 'module-a-conformity-assessment', label: 'Open the Module A record template' }, 'conf-3': { templateId: 'eu-declaration-conformity', label: 'Open the Declaration of Conformity template' }, 'ong-1': { templateId: 'support-update-policy', label: 'Open the support policy template' }, };