diff --git a/admin-compliance/app/sdk/document-generator/_constants.ts b/admin-compliance/app/sdk/document-generator/_constants.ts index 8913ee2..41296e3 100644 --- a/admin-compliance/app/sdk/document-generator/_constants.ts +++ b/admin-compliance/app/sdk/document-generator/_constants.ts @@ -57,7 +57,7 @@ export const CATEGORIES: { key: string; label: string; types: string[] | null }[ // ── Organisation & HR ───────────────────────────────────────────────── - { key: 'hr', label: 'HR & Mitarbeiter', types: ['applicant_dsi', 'employee_dsi', 'employee_security_policy', 'security_awareness_policy', 'remote_work_policy', 'offboarding_policy', 'byod_policy', 'ai_usage_policy', 'whistleblower_policy'] }, + { key: 'hr', label: 'HR & Mitarbeiter', types: ['applicant_dsi', 'employee_dsi', 'employee_security_policy', 'security_awareness_policy', 'remote_work_policy', 'offboarding_policy', 'byod_policy', 'ai_usage_policy', 'whistleblower_policy', 'verpflichtungserklaerung'] }, { key: 'data_governance', label: 'Daten-Governance', types: ['data_protection_policy', 'data_classification_policy', 'data_retention_policy', 'data_transfer_policy', 'privacy_incident_policy'] }, diff --git a/backend-compliance/migrations/110_unreviewed_policies_v2.sql b/backend-compliance/migrations/110_unreviewed_policies_v2.sql new file mode 100644 index 0000000..9ee308d --- /dev/null +++ b/backend-compliance/migrations/110_unreviewed_policies_v2.sql @@ -0,0 +1,87 @@ +-- Migration 110: Review + Update der 12 bisher ungeprüften Policy-Templates +-- Alle Templates sind bereits auf gutem Niveau (7-14 Abschnitte, ISO/BSI/DSGVO) +-- Updates: AI Act Referenz, CRA, NIS2UmsuCG, Version-Bump +-- Zusaetzlich: informationspflichten + verpflichtungserklaerung pruefen + +-- =========================================================================== +-- IT Security Policies (Migration 071) — 10 Templates +-- =========================================================================== + +-- 1. Asset-Management-Richtlinie +UPDATE compliance_legal_templates SET + description = 'Asset-Management-Richtlinie nach ISO 27001 A.5.9. CMDB, Lebenszyklus, Klassifizierung, sichere Entsorgung (DIN 66399), Verantwortlichkeiten. Inkl. virtuelle Assets (APIs, KI-Modelle).', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'asset_management_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 2. Datensicherungsrichtlinie +UPDATE compliance_legal_templates SET + description = 'Datensicherungsrichtlinie nach BSI CON.3. 3-2-1-Regel, RTO/RPO, Backup-Zyklen, Verschluesselung, Restore-Tests. Immutable Backups fuer Ransomware-Schutz.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'backup_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 3. Change-Management-Richtlinie +UPDATE compliance_legal_templates SET + description = 'Change-Management-Richtlinie nach ITIL/ISO 20000. Change-Klassen (Standard/Normal/Emergency), CAB, Risikobewertung, Rollback, Dokumentation.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'change_management_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 4. Cloud-Security-Richtlinie +UPDATE compliance_legal_templates SET + description = 'Cloud-Security-Richtlinie nach ISO 27017/27018. Shared Responsibility, Vendor-Assessment, Datenresidenz, Verschluesselung (BYOK), Exit-Strategie. NIS2/CRA-konform.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'cloud_security_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 5. DevSecOps-Richtlinie +UPDATE compliance_legal_templates SET + description = 'DevSecOps-Richtlinie fuer sichere Softwareentwicklung. SDLC, CI/CD-Gates (SAST/SCA/Container-Scan), Code-Review, Secrets Management. CRA Art. 21 konform.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'devsecops_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 6. Incident-Response-Richtlinie (ergaenzt den Incident-Response-Plan aus 051) +UPDATE compliance_legal_templates SET + description = 'Incident-Response-Richtlinie: Kurzfassung der Reaktionsprozesse fuer Mitarbeitende. Klassifizierung (P1-P4), Eskalation, Meldepflichten (DSGVO 72h, NIS2 24h). Ergaenzt den detaillierten Incident-Response-Plan.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'incident_response_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 7. Protokollierungsrichtlinie (ergaenzt das Logging-Konzept aus 051) +UPDATE compliance_legal_templates SET + description = 'Protokollierungsrichtlinie: Kurzfassung der Logging-Anforderungen fuer Mitarbeitende und Entwickler. Pflicht-Events, Log-Format, Aufbewahrung, SIEM. Ergaenzt das detaillierte Logging-Konzept.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'logging_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 8. Patch-Management-Richtlinie +UPDATE compliance_legal_templates SET + description = 'Patch-Management-Richtlinie nach BSI OPS.1.1.3. Scan-Zyklen, CVSS-Klassifizierung, SLAs (72h-90d), Ausnahmen, Automatisierung. NIS2/CRA-konform.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'patch_management_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 9. Secrets-Management-Richtlinie +UPDATE compliance_legal_templates SET + description = 'Secrets-Management-Richtlinie: Vault-basierte zentrale Verwaltung, Rotation (90d DB, 180d API), kein Hardcoding, Break-Glass-Verfahren.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'secrets_management_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 10. Schwachstellenmanagement-Richtlinie +UPDATE compliance_legal_templates SET + description = 'Schwachstellenmanagement-Richtlinie nach ISO 27001 A.8.8. Scan-Schedule, CVSS-Klassifizierung, SLAs, Triage, Responsible Disclosure (90d), Metriken. CRA-konform.', + version = '1.1.0', updated_at = NOW() +WHERE document_type = 'vulnerability_management_policy' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- =========================================================================== +-- Altbestand aus Migration 021 — 2 Templates +-- =========================================================================== + +-- 11. Informationspflichten — evtl. Duplikat zu privacy_policy +-- Entscheidung: BEHALTEN als separates, kuerzeres Dokument fuer interne Zwecke +-- (privacy_policy ist die ausfuehrliche DSI fuer externe Kommunikation) +UPDATE compliance_legal_templates SET + description = 'Kompakte Uebersicht der Informationspflichten gemaess Art. 13/14 DSGVO. Kurzfassung fuer interne Verwendung (Checkliste). Die ausfuehrliche Datenschutzinformation fuer Kunden/Nutzer ist das privacy_policy Template.', + version = '1.1', updated_at = NOW() +WHERE document_type = 'informationspflichten' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e'; + +-- 12. Verpflichtungserklaerung auf das Datengeheimnis +-- Eigenstaendiges HR-Dokument: Mitarbeiter unterschreiben bei Eintritt +UPDATE compliance_legal_templates SET + description = 'Verpflichtungserklaerung auf das Datengeheimnis fuer Mitarbeitende. Wird bei Eintritt unterschrieben. Bezieht sich auf DSGVO, BDSG und betriebliche Datenschutzrichtlinien. Eigenstaendiges HR-Dokument.', + version = '1.1', updated_at = NOW() +WHERE document_type = 'verpflichtungserklaerung' AND tenant_id = '9282a473-5c95-4b3a-bf78-0ecc0ec71d3e';