@aegis-scan/skills 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ATTRIBUTION.md +204 -0
- package/CHANGELOG.md +48 -3
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/.claude-plugin/plugin.json +108 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/CHANGELOG.md +1080 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/HANDOVER-LO-LIVE-VERIFICATION-2026-05-15.md +187 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/LICENSE +43 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/README.md +242 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/SKILL.md +427 -14
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/audit.md +193 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/avv-redline.md +246 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/az-verify.md +155 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/cold-start.md +157 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/dsar-respond.md +180 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/health.md +50 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/simulate.md +158 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/post_write.py +315 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/prompt_submit.py +144 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/session_start.py +57 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/triggers.json +191 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/INDEX.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/abmahn-templates.md +1 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/aegis-integration.md +63 -9
- package/skills/compliance/aegis-native/brutaler-anwalt/references/audit-patterns.md +1581 -10
- package/skills/compliance/aegis-native/brutaler-anwalt/references/az-auffuellung-batch1.md +468 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/bgh-urteile.md +323 -31
- package/skills/compliance/aegis-native/brutaler-anwalt/references/branchenrecht.md +610 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/checklisten.md +107 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-aufsichtsbehoerden-taetigkeitsberichte-2024.md +310 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-bussgeld-argumentations-layer.md +598 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-dsk-beschluesse.md +346 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/audit-relevance.md +76 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/paragraphs.md +115 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/audit-relevance.md +58 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/paragraphs.md +95 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/audit-relevance.md +60 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/paragraphs.md +90 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/audit-relevance.md +73 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/paragraphs.md +114 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/audit-relevance.md +72 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/paragraphs.md +103 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/audit-relevance.md +65 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/paragraphs.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/audit-relevance.md +66 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/paragraphs.md +108 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/audit-relevance.md +80 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/paragraphs.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/audit-relevance.md +89 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/paragraphs.md +107 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/audit-relevance.md +62 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/paragraphs.md +119 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/audit-relevance.md +70 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/paragraphs.md +125 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/audit-relevance.md +70 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/paragraphs.md +116 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/INDEX.md +152 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/audit-relevance.md +64 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/paragraphs.md +110 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/audit-relevance.md +63 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/paragraphs.md +90 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/audit-relevance.md +61 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/paragraphs.md +96 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/audit-relevance.md +54 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/paragraphs.md +82 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/audit-relevance.md +76 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/paragraphs.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/audit-relevance.md +84 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/paragraphs.md +114 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/audit-relevance.md +92 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/paragraphs.md +91 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/audit-relevance.md +85 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/paragraphs.md +166 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/audit-relevance.md +71 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/paragraphs.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VERIFICATION-NOTES.md +111 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/audit-relevance.md +65 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/paragraphs.md +101 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/audit-relevance.md +62 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/paragraphs.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/audit-relevance.md +64 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/paragraphs.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/audit-relevance.md +68 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/paragraphs.md +110 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/dsgvo.md +81 -8
- package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-edpb-guidelines.md +505 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-eugh-dsgvo-schadensersatz.md +223 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BDSG/audit-relevance.md +31 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BDSG/paragraphs.md +62 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BFSG/audit-relevance.md +39 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BFSG/paragraphs.md +85 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BGB/audit-relevance.md +42 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BGB/paragraphs.md +112 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DDG/audit-relevance.md +28 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DDG/paragraphs.md +71 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DSGVO/articles.md +182 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DSGVO/audit-relevance.md +35 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/articles.md +111 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/audit-relevance.md +139 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/gpai-pflichten.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/hochrisiko-annex-iii.md +134 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/sanktionen-art-99.md +97 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/transparenz-art-50.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/uebergangsfristen.md +109 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CER-2022-2557/articles.md +42 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CRA-2024-2847/articles.md +87 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSDDD-2024-1760/articles.md +43 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSRD-2022-2464/articles.md +42 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DGA-2022-868/articles.md +53 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DMA-2022-1925/articles.md +55 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/articles.md +164 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/audit-relevance.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/articles.md +134 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/audit-relevance.md +110 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/notice-and-action.md +138 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/small-platform-pflichten.md +109 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/trusted-flaggers.md +77 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/vlop-vlose.md +130 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/articles.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/audit-relevance.md +77 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/articles.md +124 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/audit-relevance.md +85 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/NIS2-2022-2555/articles.md +101 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/ProdHaftRL-2024-2853/articles.md +68 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/eIDAS-2024-1183/articles.md +43 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/KWG.md +52 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/PSD2.md +67 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/ZAG.md +50 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/GlueStV/articles.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HGB-AO/audit-relevance.md +27 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HGB-AO/paragraphs.md +61 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HinSchG/articles.md +96 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/INDEX.md +93 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/JuSchG-JMStV/articles.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/KritisDachG/articles.md +39 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/LkSG/articles.md +90 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/DiGAV.md +60 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/IVDR-2017-746.md +51 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/MDR-2017-745.md +85 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/NIS2UmsuCG-BSIG/articles.md +53 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/StGB/relevante-paragraphen.md +157 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/audit-relevance.md +33 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/paragraphs.md +68 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TKG/articles.md +73 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/audit-relevance.md +39 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/paragraphs.md +185 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VERIFICATION-STATUS.md +266 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VSBG/audit-relevance.md +37 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VSBG/paragraphs.md +57 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/articles.md +92 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/audit-relevance.md +62 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/it-recht.md +137 -9
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/INDEX.md +122 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/ai/anthropic-dpa.md +87 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/ai/mistral-eu.md +123 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/ai/openai-dpa.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/cookie-banner-pattern.md +202 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/dse-section-pattern.md +198 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/tracking-server-endpoint.md +193 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/auth0-tom.md +92 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/clerk-tom.md +84 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/nextauth-tom.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/supabase-auth-tom.md +104 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/auth-cookies-pattern.md +295 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/cookie-banner-pattern.md +318 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/gdpr-cleanup-celery.md +339 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/cookie-banner-pattern.md +237 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/gdpr-routes-pattern.md +256 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/helmet-csp-pattern.md +207 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/agb-versioning-pattern.md +305 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/cookie-banner-pattern.md +287 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/gdpr-models-pattern.md +290 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/tracking-config-pattern.md +263 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/auth-pattern.md +265 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/cookie-banner-pattern.md +255 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/gdpr-cleanup-cron.md +244 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/tracking-interceptor.md +239 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/api-route-bearer-auth.md +103 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/dynamic-rendering-headers.md +83 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/env-driven-tracking.md +135 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/proxy-csp-pattern.md +93 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/payment/stripe-pci-tom.md +121 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/cookie-banner-pattern.md +294 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/devise-dsgvo-pattern.md +262 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/gdpr-anonymization-pattern.md +283 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/consent-gate-pattern.md +99 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/cookie-banner-pattern.md +204 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/cms-pii-pattern.md +301 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/notice-and-action-plugin.md +371 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/cookie-banner-pattern.md +234 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/dse-section-pattern.md +231 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/sveltekit-server-hooks-pattern.md +217 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/google-analytics-consent.md +129 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/plausible-pattern.md +107 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/posthog-consent.md +79 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/cookie-banner-pattern.md +208 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/dse-i18n-pattern.md +204 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/nuxt-vs-vue-only-pattern.md +197 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/tracking-pinia-pattern.md +211 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/strafrecht-steuer.md +1 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/streitwerte.json +176 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/AffiliateDisclaimer.tsx.example +54 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/COMPLIANCE-AUDIT-TRAIL-template.md +95 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/DSE-Section-UGC.md.example +77 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/DSFA-template.md +156 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/LostFoundReportForm-consent.tsx.example +126 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/README.md +33 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/UmamiScript.tsx.example +64 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/VVT-template-file-upload.md +98 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/VVT-template.md +60 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/data-retention-cron.ts.example +52 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/data-retention-workflow.yml.example +47 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/proxy-strict-dynamic.ts.example +80 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/security.txt.example +26 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-EN-international.md +267 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Audit-Klausel-Varianten.md +148 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-CH-revDSG.md +127 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module2-controller-processor.md +180 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module3-processor-subprocessor.md +144 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Sub-Processor-List.md +114 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-TOMs.md +197 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-UK-IDTA.md +131 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-standard-DE.md +288 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/Joint-Controller-Vertrag-Art-26.md +265 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/scripts/health-check.sh +262 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/scripts/test-triggers.sh +145 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/settings.json +90 -0
- package/skills/defensive/aegis-native/rls-defense/SKILL.md +85 -0
- package/skills/defensive/permoon-fork/README.md +40 -0
- package/skills/defensive/permoon-fork/multi-model-consolidation/SKILL.md +47 -0
- package/skills/defensive/permoon-fork/multi-model-severity/SKILL.md +34 -0
- package/skills/defensive/permoon-fork/multi-model-system-prompt/SKILL.md +40 -0
- package/skills/foundation/aegis-native/aegis-handover-writer/SKILL.md +1 -1
- package/skills/foundation/aegis-native/aegis-module-builder/SKILL.md +5 -1
- package/skills/foundation/aegis-native/aegis-orchestrator/SKILL.md +87 -4
- package/skills/foundation/aegis-native/aegis-quality-gates/SKILL.md +69 -9
- package/skills/offensive/airecon-fork/ctf-crypto/SKILL.md +260 -0
- package/skills/offensive/airecon-fork/ctf-crypto-modern-ciphers/SKILL.md +688 -0
- package/skills/offensive/airecon-fork/ctf-forensics/SKILL.md +253 -0
- package/skills/offensive/airecon-fork/ctf-forensics-network/SKILL.md +480 -0
- package/skills/offensive/airecon-fork/ctf-heap-advanced/SKILL.md +336 -0
- package/skills/offensive/airecon-fork/ctf-pwn/SKILL.md +294 -0
- package/skills/offensive/airecon-fork/ctf-pwn-rop-and-shellcode/SKILL.md +392 -0
- package/skills/offensive/airecon-fork/ctf-reversing/SKILL.md +284 -0
- package/skills/offensive/airecon-fork/frameworks-django/SKILL.md +268 -0
- package/skills/offensive/airecon-fork/frameworks-dotnet/SKILL.md +280 -0
- package/skills/offensive/airecon-fork/frameworks-express/SKILL.md +266 -0
- package/skills/offensive/airecon-fork/frameworks-fastapi/SKILL.md +193 -0
- package/skills/offensive/airecon-fork/frameworks-flask/SKILL.md +297 -0
- package/skills/offensive/airecon-fork/frameworks-laravel/SKILL.md +260 -0
- package/skills/offensive/airecon-fork/frameworks-nextjs/SKILL.md +230 -0
- package/skills/offensive/airecon-fork/frameworks-php/SKILL.md +271 -0
- package/skills/offensive/airecon-fork/frameworks-rails/SKILL.md +269 -0
- package/skills/offensive/airecon-fork/frameworks-spring/SKILL.md +245 -0
- package/skills/offensive/airecon-fork/frameworks-wordpress/SKILL.md +348 -0
- package/skills/offensive/airecon-fork/payloads-command-injection/SKILL.md +459 -0
- package/skills/offensive/airecon-fork/payloads-http-parameter-pollution/SKILL.md +129 -0
- package/skills/offensive/airecon-fork/payloads-ldap-injection/SKILL.md +100 -0
- package/skills/offensive/airecon-fork/payloads-lfi/SKILL.md +485 -0
- package/skills/offensive/airecon-fork/payloads-sqli/SKILL.md +419 -0
- package/skills/offensive/airecon-fork/payloads-ssrf/SKILL.md +125 -0
- package/skills/offensive/airecon-fork/payloads-ssti/SKILL.md +443 -0
- package/skills/offensive/airecon-fork/payloads-xss/SKILL.md +447 -0
- package/skills/offensive/airecon-fork/payloads-xxe/SKILL.md +172 -0
- package/skills/offensive/airecon-fork/postexploit-ad-credential-attacks/SKILL.md +306 -0
- package/skills/offensive/airecon-fork/postexploit-container-escape/SKILL.md +299 -0
- package/skills/offensive/airecon-fork/postexploit-credential-dumping/SKILL.md +249 -0
- package/skills/offensive/airecon-fork/postexploit-lateral-movement/SKILL.md +194 -0
- package/skills/offensive/airecon-fork/postexploit-linux-privesc/SKILL.md +252 -0
- package/skills/offensive/airecon-fork/postexploit-netexec-workflow/SKILL.md +302 -0
- package/skills/offensive/airecon-fork/postexploit-pivoting/SKILL.md +205 -0
- package/skills/offensive/airecon-fork/postexploit-windows-privesc/SKILL.md +210 -0
- package/skills/offensive/airecon-fork/protocols-active-directory/SKILL.md +314 -0
- package/skills/offensive/airecon-fork/protocols-dns/SKILL.md +203 -0
- package/skills/offensive/airecon-fork/protocols-ftp/SKILL.md +159 -0
- package/skills/offensive/airecon-fork/protocols-graphql/SKILL.md +648 -0
- package/skills/offensive/airecon-fork/protocols-kerberos/SKILL.md +168 -0
- package/skills/offensive/airecon-fork/protocols-ldap/SKILL.md +245 -0
- package/skills/offensive/airecon-fork/protocols-rdp/SKILL.md +186 -0
- package/skills/offensive/airecon-fork/protocols-smb/SKILL.md +191 -0
- package/skills/offensive/airecon-fork/protocols-smtp-imap/SKILL.md +263 -0
- package/skills/offensive/airecon-fork/protocols-snmp/SKILL.md +147 -0
- package/skills/offensive/airecon-fork/protocols-ssh/SKILL.md +287 -0
- package/skills/offensive/airecon-fork/reconnaissance-asn-whois-osint/SKILL.md +236 -0
- package/skills/offensive/airecon-fork/reconnaissance-ctf-methodology/SKILL.md +435 -0
- package/skills/offensive/airecon-fork/reconnaissance-dorking/SKILL.md +182 -0
- package/skills/offensive/airecon-fork/reconnaissance-exposed-devtools-detection/SKILL.md +513 -0
- package/skills/offensive/airecon-fork/reconnaissance-full-recon/SKILL.md +305 -0
- package/skills/offensive/airecon-fork/reconnaissance-internal-pentest/SKILL.md +202 -0
- package/skills/offensive/airecon-fork/reconnaissance-javascript-analysis/SKILL.md +167 -0
- package/skills/offensive/airecon-fork/reconnaissance-js-internal-hostname-intelligence/SKILL.md +391 -0
- package/skills/offensive/airecon-fork/reconnaissance-monitoring-secrets-exposure/SKILL.md +394 -0
- package/skills/offensive/airecon-fork/reconnaissance-shodan-censys/SKILL.md +279 -0
- package/skills/offensive/airecon-fork/reconnaissance-subdomain-enum/SKILL.md +952 -0
- package/skills/offensive/airecon-fork/technologies-cicd-attacks/SKILL.md +283 -0
- package/skills/offensive/airecon-fork/technologies-cloud-security/SKILL.md +299 -0
- package/skills/offensive/airecon-fork/technologies-docker-container/SKILL.md +266 -0
- package/skills/offensive/airecon-fork/technologies-elasticsearch/SKILL.md +226 -0
- package/skills/offensive/airecon-fork/technologies-firebase-firestore/SKILL.md +213 -0
- package/skills/offensive/airecon-fork/technologies-frida-hooking/SKILL.md +387 -0
- package/skills/offensive/airecon-fork/technologies-gitlab-github/SKILL.md +259 -0
- package/skills/offensive/airecon-fork/technologies-jenkins/SKILL.md +256 -0
- package/skills/offensive/airecon-fork/technologies-kubernetes-pentest/SKILL.md +281 -0
- package/skills/offensive/airecon-fork/technologies-memcached/SKILL.md +230 -0
- package/skills/offensive/airecon-fork/technologies-mobile-app-pentesting/SKILL.md +105 -0
- package/skills/offensive/airecon-fork/technologies-mongodb/SKILL.md +257 -0
- package/skills/offensive/airecon-fork/technologies-nginx-apache/SKILL.md +280 -0
- package/skills/offensive/airecon-fork/technologies-observability-stack-attacks/SKILL.md +501 -0
- package/skills/offensive/airecon-fork/technologies-redis/SKILL.md +236 -0
- package/skills/offensive/airecon-fork/technologies-supabase/SKILL.md +270 -0
- package/skills/offensive/airecon-fork/technologies-tomcat/SKILL.md +232 -0
- package/skills/offensive/airecon-fork/tools-advanced-fuzzing/SKILL.md +351 -0
- package/skills/offensive/airecon-fork/tools-browser-automation/SKILL.md +300 -0
- package/skills/offensive/airecon-fork/tools-caido/SKILL.md +776 -0
- package/skills/offensive/airecon-fork/tools-code-review/SKILL.md +71 -0
- package/skills/offensive/airecon-fork/tools-dalfox/SKILL.md +189 -0
- package/skills/offensive/airecon-fork/tools-hashcat-john/SKILL.md +258 -0
- package/skills/offensive/airecon-fork/tools-impacket/SKILL.md +227 -0
- package/skills/offensive/airecon-fork/tools-install/SKILL.md +202 -0
- package/skills/offensive/airecon-fork/tools-metasploit/SKILL.md +270 -0
- package/skills/offensive/airecon-fork/tools-nmap/SKILL.md +211 -0
- package/skills/offensive/airecon-fork/tools-nuclei/SKILL.md +175 -0
- package/skills/offensive/airecon-fork/tools-reporting/SKILL.md +47 -0
- package/skills/offensive/airecon-fork/tools-scripting/SKILL.md +1939 -0
- package/skills/offensive/airecon-fork/tools-semgrep/SKILL.md +202 -0
- package/skills/offensive/airecon-fork/tools-source-audit/SKILL.md +308 -0
- package/skills/offensive/airecon-fork/tools-sqlmap/SKILL.md +137 -0
- package/skills/offensive/airecon-fork/tools-tool-catalog/SKILL.md +320 -0
- package/skills/offensive/airecon-fork/tools-wapiti/SKILL.md +293 -0
- package/skills/offensive/airecon-fork/vulnerabilities-2fa-bypass/SKILL.md +219 -0
- package/skills/offensive/airecon-fork/vulnerabilities-account-takeover/SKILL.md +223 -0
- package/skills/offensive/airecon-fork/vulnerabilities-api-schema-exposure/SKILL.md +849 -0
- package/skills/offensive/airecon-fork/vulnerabilities-api-testing/SKILL.md +278 -0
- package/skills/offensive/airecon-fork/vulnerabilities-auth-workflow/SKILL.md +252 -0
- package/skills/offensive/airecon-fork/vulnerabilities-authentication-jwt/SKILL.md +158 -0
- package/skills/offensive/airecon-fork/vulnerabilities-bfla/SKILL.md +156 -0
- package/skills/offensive/airecon-fork/vulnerabilities-blind-xss/SKILL.md +111 -0
- package/skills/offensive/airecon-fork/vulnerabilities-business-logic/SKILL.md +313 -0
- package/skills/offensive/airecon-fork/vulnerabilities-cors/SKILL.md +242 -0
- package/skills/offensive/airecon-fork/vulnerabilities-crlf-injection/SKILL.md +146 -0
- package/skills/offensive/airecon-fork/vulnerabilities-csrf/SKILL.md +200 -0
- package/skills/offensive/airecon-fork/vulnerabilities-csrf-advanced-bypass/SKILL.md +536 -0
- package/skills/offensive/airecon-fork/vulnerabilities-deserialization/SKILL.md +363 -0
- package/skills/offensive/airecon-fork/vulnerabilities-dom-based-vulnerabilities/SKILL.md +105 -0
- package/skills/offensive/airecon-fork/vulnerabilities-exploitation/SKILL.md +286 -0
- package/skills/offensive/airecon-fork/vulnerabilities-grpc/SKILL.md +123 -0
- package/skills/offensive/airecon-fork/vulnerabilities-host-header-injection/SKILL.md +169 -0
- package/skills/offensive/airecon-fork/vulnerabilities-http-smuggling/SKILL.md +411 -0
- package/skills/offensive/airecon-fork/vulnerabilities-idor/SKILL.md +705 -0
- package/skills/offensive/airecon-fork/vulnerabilities-information-disclosure/SKILL.md +867 -0
- package/skills/offensive/airecon-fork/vulnerabilities-insecure-file-uploads/SKILL.md +190 -0
- package/skills/offensive/airecon-fork/vulnerabilities-jwt-attacks/SKILL.md +270 -0
- package/skills/offensive/airecon-fork/vulnerabilities-kubernetes/SKILL.md +252 -0
- package/skills/offensive/airecon-fork/vulnerabilities-mass-assignment/SKILL.md +788 -0
- package/skills/offensive/airecon-fork/vulnerabilities-nosql-injection/SKILL.md +204 -0
- package/skills/offensive/airecon-fork/vulnerabilities-oauth-misconfig/SKILL.md +220 -0
- package/skills/offensive/airecon-fork/vulnerabilities-oauth-saml/SKILL.md +163 -0
- package/skills/offensive/airecon-fork/vulnerabilities-open-redirect/SKILL.md +167 -0
- package/skills/offensive/airecon-fork/vulnerabilities-password-reset-poisoning/SKILL.md +66 -0
- package/skills/offensive/airecon-fork/vulnerabilities-path-traversal/SKILL.md +192 -0
- package/skills/offensive/airecon-fork/vulnerabilities-privilege-escalation/SKILL.md +320 -0
- package/skills/offensive/airecon-fork/vulnerabilities-prototype-pollution/SKILL.md +242 -0
- package/skills/offensive/airecon-fork/vulnerabilities-race-conditions/SKILL.md +192 -0
- package/skills/offensive/airecon-fork/vulnerabilities-rce/SKILL.md +240 -0
- package/skills/offensive/airecon-fork/vulnerabilities-sensitive-file-pii-exposure/SKILL.md +589 -0
- package/skills/offensive/airecon-fork/vulnerabilities-spring4shell/SKILL.md +86 -0
- package/skills/offensive/airecon-fork/vulnerabilities-sql-injection/SKILL.md +313 -0
- package/skills/offensive/airecon-fork/vulnerabilities-ssrf/SKILL.md +183 -0
- package/skills/offensive/airecon-fork/vulnerabilities-ssti/SKILL.md +344 -0
- package/skills/offensive/airecon-fork/vulnerabilities-subdomain-takeover/SKILL.md +160 -0
- package/skills/offensive/airecon-fork/vulnerabilities-supply-chain/SKILL.md +125 -0
- package/skills/offensive/airecon-fork/vulnerabilities-unhandled-exception-differential/SKILL.md +742 -0
- package/skills/offensive/airecon-fork/vulnerabilities-waf-detection/SKILL.md +90 -0
- package/skills/offensive/airecon-fork/vulnerabilities-web-cache-poisoning/SKILL.md +233 -0
- package/skills/offensive/airecon-fork/vulnerabilities-websocket/SKILL.md +180 -0
- package/skills/offensive/airecon-fork/vulnerabilities-xss/SKILL.md +316 -0
- package/skills/offensive/airecon-fork/vulnerabilities-xxe/SKILL.md +222 -0
- package/skills/offensive/matty-fork/cicd-redteam/SKILL.md +531 -0
- package/skills/offensive/matty-fork/cloud-security/SKILL.md +106 -0
- package/skills/offensive/matty-fork/container-escape/SKILL.md +174 -0
- package/skills/offensive/matty-fork/mobile-pentester/SKILL.md +357 -0
- package/skills/offensive/matty-fork/subdomain-takeover/SKILL.md +154 -0
- package/skills/osint/elementalsouls-fork/offensive-osint/README.md +92 -0
- package/skills/osint/elementalsouls-fork/offensive-osint/SKILL.md +4177 -0
- package/skills/osint/elementalsouls-fork/osint-methodology/README.md +66 -0
- package/skills/osint/elementalsouls-fork/osint-methodology/SKILL.md +1695 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: NestJS + @nestjs/schedule (Open-Source)
|
|
4
|
+
last-checked: 2026-05-05
|
|
5
|
+
purpose: NestJS Schedule-Module + Soft-Delete + Anonymisierungs-Cron fuer DSGVO-Loeschpflichten.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# NestJS — GDPR-Cleanup-Cron Pattern
|
|
9
|
+
|
|
10
|
+
## Trigger / Detection
|
|
11
|
+
|
|
12
|
+
Repo enthaelt:
|
|
13
|
+
- `@nestjs/schedule` in Dependencies
|
|
14
|
+
- `@Cron(...)` Decorator-Verwendung
|
|
15
|
+
- `ScheduleModule.forRoot()` in `AppModule`
|
|
16
|
+
- Optional: Soft-Delete-Patterns (`deletedAt: Date | null`)
|
|
17
|
+
- Optional: Anonymisierungs-Service
|
|
18
|
+
|
|
19
|
+
## Default-Verhalten (was passiert ohne Konfiguration)
|
|
20
|
+
|
|
21
|
+
- Soft-Deletes bleiben unbegrenzt → DSGVO Art. 5 lit. e Verstoss (Speicherbegrenzung)
|
|
22
|
+
- Inaktive User-Accounts bleiben → uebermaessige Speicherung
|
|
23
|
+
- Analytics-Events ohne Loeschfrist → Profil-Bildung trotz Widerruf
|
|
24
|
+
- Backup-Files ohne Rotation → DSE-Drift gegenueber Realitaet
|
|
25
|
+
- Kein Cron-Watchdog → silent failure bei Job-Crash
|
|
26
|
+
|
|
27
|
+
## Compliance-Risiken
|
|
28
|
+
|
|
29
|
+
| Risiko | Norm | Severity | Fix |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| Soft-Deletes nie hard-deleted | Art. 5 lit. e DSGVO | KRITISCH | Cron `0 3 * * *` mit Hard-Delete |
|
|
32
|
+
| Inaktive Accounts unbegrenzt | Art. 5 lit. e | HOCH | Inaktivitaets-Cleanup nach <placeholder-days> Tagen |
|
|
33
|
+
| Analytics-Events nie geloescht | Art. 5 lit. e | HOCH | Tabellen-Truncate-Cron |
|
|
34
|
+
| Cron-Crash unbemerkt | Art. 5 Abs. 2 (Rechenschaft) | KRITISCH | Health-Endpoint + Last-Run-Tabelle |
|
|
35
|
+
| Concurrent-Cron-Runs | Datenintegritaet | MITTEL | Distributed-Lock (Redis SETNX) |
|
|
36
|
+
|
|
37
|
+
## Code-Pattern (sanitized)
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
// File: src/gdpr/gdpr-cleanup.service.ts
|
|
41
|
+
import { Injectable, Logger } from '@nestjs/common';
|
|
42
|
+
import { Cron, CronExpression } from '@nestjs/schedule';
|
|
43
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
44
|
+
import { Repository, LessThan } from 'typeorm';
|
|
45
|
+
import { User } from '../users/user.entity';
|
|
46
|
+
import { ConsentLog } from '../consent/consent-log.entity';
|
|
47
|
+
import { AnalyticsEvent } from '../analytics/analytics-event.entity';
|
|
48
|
+
import { CronRun } from './cron-run.entity';
|
|
49
|
+
|
|
50
|
+
@Injectable()
|
|
51
|
+
export class GdprCleanupService {
|
|
52
|
+
private readonly logger = new Logger(GdprCleanupService.name);
|
|
53
|
+
|
|
54
|
+
constructor(
|
|
55
|
+
@InjectRepository(User) private readonly users: Repository<User>,
|
|
56
|
+
@InjectRepository(ConsentLog) private readonly consentLogs: Repository<ConsentLog>,
|
|
57
|
+
@InjectRepository(AnalyticsEvent) private readonly events: Repository<AnalyticsEvent>,
|
|
58
|
+
@InjectRepository(CronRun) private readonly runs: Repository<CronRun>,
|
|
59
|
+
) {}
|
|
60
|
+
|
|
61
|
+
@Cron('0 3 * * *', { name: 'gdpr-hard-delete' }) // Taeglich 3 Uhr UTC
|
|
62
|
+
async hardDeleteSoftDeleted() {
|
|
63
|
+
const start = Date.now();
|
|
64
|
+
const cutoff = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000); // 30 Tage Widerruf-Frist
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
const result = await this.users.delete({
|
|
68
|
+
deletedAt: LessThan(cutoff),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
await this.runs.save({
|
|
72
|
+
jobName: 'gdpr-hard-delete',
|
|
73
|
+
startedAt: new Date(start),
|
|
74
|
+
finishedAt: new Date(),
|
|
75
|
+
status: 'SUCCESS',
|
|
76
|
+
deletedCount: result.affected ?? 0,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
this.logger.log(`Hard-deleted ${result.affected} users (cutoff ${cutoff.toISOString()})`);
|
|
80
|
+
} catch (err: any) {
|
|
81
|
+
await this.runs.save({
|
|
82
|
+
jobName: 'gdpr-hard-delete',
|
|
83
|
+
startedAt: new Date(start),
|
|
84
|
+
finishedAt: new Date(),
|
|
85
|
+
status: 'FAILED',
|
|
86
|
+
error: err.message,
|
|
87
|
+
});
|
|
88
|
+
this.logger.error(`Cron failed: ${err.message}`);
|
|
89
|
+
throw err;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@Cron('0 4 * * 0', { name: 'inactive-user-cleanup' }) // Sonntag 4 Uhr UTC
|
|
94
|
+
async deleteInactiveUsers() {
|
|
95
|
+
const cutoff = new Date(Date.now() - 365 * 2 * 24 * 60 * 60 * 1000); // 2 Jahre inaktiv
|
|
96
|
+
|
|
97
|
+
const inactive = await this.users.find({
|
|
98
|
+
where: { lastLoginAt: LessThan(cutoff), deletedAt: null },
|
|
99
|
+
take: 1000, // Batch-Limit
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
for (const user of inactive) {
|
|
103
|
+
await this.users.update(user.id, {
|
|
104
|
+
deletedAt: new Date(),
|
|
105
|
+
deletionReason: 'INACTIVITY_TIMEOUT_2_YEARS',
|
|
106
|
+
email: `inactive-${user.id}@<placeholder-domain>`,
|
|
107
|
+
name: 'GELOESCHT',
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
this.logger.log(`Soft-deleted ${inactive.length} inactive users`);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@Cron('0 5 * * *', { name: 'analytics-events-cleanup' }) // Taeglich 5 Uhr UTC
|
|
115
|
+
async deleteOldAnalyticsEvents() {
|
|
116
|
+
const cutoff = new Date(Date.now() - 90 * 24 * 60 * 60 * 1000); // 90 Tage Speicherfrist
|
|
117
|
+
|
|
118
|
+
const result = await this.events.delete({
|
|
119
|
+
timestamp: LessThan(cutoff),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
this.logger.log(`Deleted ${result.affected} old analytics events`);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@Cron('0 6 * * 0', { name: 'consent-log-rotation' }) // Sonntag 6 Uhr UTC
|
|
126
|
+
async rotateConsentLogs() {
|
|
127
|
+
// 6 Jahre Aufbewahrung (Verjaehrungsfrist Schadensersatz DSGVO)
|
|
128
|
+
const cutoff = new Date(Date.now() - 6 * 365 * 24 * 60 * 60 * 1000);
|
|
129
|
+
|
|
130
|
+
const result = await this.consentLogs.delete({
|
|
131
|
+
timestamp: LessThan(cutoff),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
this.logger.log(`Rotated ${result.affected} old consent logs`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
// File: src/gdpr/health.controller.ts
|
|
141
|
+
import { Controller, Get } from '@nestjs/common';
|
|
142
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
143
|
+
import { Repository, MoreThan } from 'typeorm';
|
|
144
|
+
import { CronRun } from './cron-run.entity';
|
|
145
|
+
|
|
146
|
+
@Controller('health')
|
|
147
|
+
export class HealthController {
|
|
148
|
+
constructor(
|
|
149
|
+
@InjectRepository(CronRun) private readonly runs: Repository<CronRun>,
|
|
150
|
+
) {}
|
|
151
|
+
|
|
152
|
+
@Get('cron')
|
|
153
|
+
async cronHealth() {
|
|
154
|
+
const last24h = new Date(Date.now() - 24 * 60 * 60 * 1000);
|
|
155
|
+
|
|
156
|
+
const recentRuns = await this.runs.find({
|
|
157
|
+
where: { startedAt: MoreThan(last24h) },
|
|
158
|
+
order: { startedAt: 'DESC' },
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const failed = recentRuns.filter(r => r.status === 'FAILED');
|
|
162
|
+
const expectedJobs = ['gdpr-hard-delete', 'analytics-events-cleanup'];
|
|
163
|
+
const missingJobs = expectedJobs.filter(
|
|
164
|
+
j => !recentRuns.some(r => r.jobName === j && r.status === 'SUCCESS')
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
healthy: failed.length === 0 && missingJobs.length === 0,
|
|
169
|
+
recentRuns: recentRuns.length,
|
|
170
|
+
failedRuns: failed.length,
|
|
171
|
+
missingJobs,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
// File: src/app.module.ts (Auszug)
|
|
179
|
+
import { Module } from '@nestjs/common';
|
|
180
|
+
import { ScheduleModule } from '@nestjs/schedule';
|
|
181
|
+
import { GdprCleanupService } from './gdpr/gdpr-cleanup.service';
|
|
182
|
+
|
|
183
|
+
@Module({
|
|
184
|
+
imports: [ScheduleModule.forRoot()],
|
|
185
|
+
providers: [GdprCleanupService],
|
|
186
|
+
})
|
|
187
|
+
export class AppModule {}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## AVV / DPA
|
|
191
|
+
|
|
192
|
+
- Datenbank — AVV (Hard-Delete-Wirksamkeit muss garantiert sein)
|
|
193
|
+
- Backup-Provider — AVV mit Rotation-Garantie (sonst Hard-Delete in Backup nicht wirksam)
|
|
194
|
+
- Cron-Watchdog (UptimeRobot / better-stack EU) — optional, AVV bei Health-Pings
|
|
195
|
+
|
|
196
|
+
## DSE-Wording-Vorlage
|
|
197
|
+
|
|
198
|
+
```markdown
|
|
199
|
+
### Loeschfristen und automatisierte Datenbereinigung
|
|
200
|
+
|
|
201
|
+
Wir loeschen Ihre Daten automatisch nach folgenden Fristen:
|
|
202
|
+
|
|
203
|
+
| Datenkategorie | Frist | Ausloeser |
|
|
204
|
+
|---|---|---|
|
|
205
|
+
| User-Account (aktiv) | bis Loeschungs-Anfrage | Manuell |
|
|
206
|
+
| User-Account (inaktiv) | 2 Jahre nach letztem Login | Automatisch (taeglich) |
|
|
207
|
+
| Analytics-Events | 90 Tage nach Erfassung | Automatisch (taeglich) |
|
|
208
|
+
| Consent-Logs | 6 Jahre | Automatisch (woechentlich) |
|
|
209
|
+
| Server-Logs | 14 Tage | Automatisch |
|
|
210
|
+
| Backups | 90 Tage Rotation | Provider-seitig |
|
|
211
|
+
|
|
212
|
+
**Soft-Delete + Hard-Delete:**
|
|
213
|
+
Bei manueller Loeschung wird Ihr Account zunaechst soft-geloescht (PII
|
|
214
|
+
ueberschrieben, Account deaktiviert). Nach 30 Tagen Widerruf-Frist erfolgt
|
|
215
|
+
das endgueltige Hard-Delete in allen Systemen.
|
|
216
|
+
|
|
217
|
+
**Rechtsgrundlage:** Art. 5 lit. e DSGVO (Speicherbegrenzung).
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Verify-Commands (Live-Probe)
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# 1. Cron-Health-Endpoint
|
|
224
|
+
curl https://<placeholder-domain>/health/cron
|
|
225
|
+
# Erwartung: { "healthy": true, "missingJobs": [] }
|
|
226
|
+
|
|
227
|
+
# 2. Bei fehlendem Job: missingJobs gefuellt
|
|
228
|
+
# (Test: stoppe Cron-Service, warte 25h, prufe Endpoint)
|
|
229
|
+
|
|
230
|
+
# 3. Soft-Delete-Wirkung
|
|
231
|
+
# DB-Query: SELECT email, deleted_at FROM users WHERE deleted_at IS NOT NULL LIMIT 5;
|
|
232
|
+
# Erwartung: email-Feld ueberschrieben, deleted_at gesetzt
|
|
233
|
+
|
|
234
|
+
# 4. Hard-Delete nach 30 Tagen
|
|
235
|
+
# DB-Query: SELECT COUNT(*) FROM users WHERE deleted_at < now() - interval '30 days';
|
|
236
|
+
# Erwartung: 0
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Cross-References
|
|
240
|
+
|
|
241
|
+
- AEGIS-Scanner: `data-retention-checker.ts`, `cron-coverage-checker.ts`, `soft-delete-checker.ts`
|
|
242
|
+
- Skill-Reference: `references/dsgvo.md` Art. 5 lit. e (Speicherbegrenzung), Art. 17 (Loeschung)
|
|
243
|
+
- BGH-Rechtsprechung: `references/bgh-urteile.md`
|
|
244
|
+
- Audit-Pattern: `references/audit-patterns.md` Phase 4 (DSE-Drift Style 2 / Cron-Coverage)
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: NestJS (Open-Source)
|
|
4
|
+
last-checked: 2026-05-05
|
|
5
|
+
purpose: NestJS Interceptor-Pattern fuer Tracker-Calls + Consent-Check + Anonymisierung.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# NestJS — Tracking-Interceptor (Pattern)
|
|
9
|
+
|
|
10
|
+
## Trigger / Detection
|
|
11
|
+
|
|
12
|
+
Repo enthaelt:
|
|
13
|
+
- `@Injectable()` Klassen die `NestInterceptor` implementieren
|
|
14
|
+
- `@UseInterceptors(...)` Decorator-Verwendung
|
|
15
|
+
- HTTP-Outbound-Calls in Service-Methoden (Tracker-Forwards)
|
|
16
|
+
- Optional: `rxjs` `tap()` / `mergeMap()` Operators
|
|
17
|
+
|
|
18
|
+
Pattern: zentraler Interceptor wrapped Tracker-Outbound-Calls. Vor dem Send wird Consent geprueft, IP gehasht, PII entfernt.
|
|
19
|
+
|
|
20
|
+
## Default-Verhalten (was passiert ohne Konfiguration)
|
|
21
|
+
|
|
22
|
+
- Tracker-Calls in Services direkt → schwer zu auditieren
|
|
23
|
+
- Kein zentraler PII-Filter → Email/Name leakt in Tracker-Payloads
|
|
24
|
+
- Kein Backpressure → bei Tracker-Overload blockiert Hauptrequest
|
|
25
|
+
- `console.log`-Debugging belaesst Klartext-Daten in stdout
|
|
26
|
+
|
|
27
|
+
## Compliance-Risiken
|
|
28
|
+
|
|
29
|
+
| Risiko | Norm | Severity | Fix |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| PII (Email/Name) in Tracker-Payload | Art. 5 lit. c DSGVO | KRITISCH | Interceptor whitelistet Felder |
|
|
32
|
+
| Klartext-IP in Tracker-Forward | Art. 5 lit. f | HOCH | IP-Hash im Interceptor |
|
|
33
|
+
| Tracker-Crash blockiert Hauptrequest | Art. 32 DSGVO | MITTEL | `catchError` + Fire-and-Forget |
|
|
34
|
+
| Drittland-Forward ohne Allowlist | Art. 44 DSGVO | KRITISCH | Allowlist in Interceptor-Config |
|
|
35
|
+
| Console-Log mit PII | Art. 5 lit. f | HOCH | Pino-Redact + Logger-Service |
|
|
36
|
+
|
|
37
|
+
## Code-Pattern (sanitized)
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
// File: src/tracking/tracking.interceptor.ts
|
|
41
|
+
import {
|
|
42
|
+
CallHandler, ExecutionContext, Injectable, NestInterceptor, Logger,
|
|
43
|
+
} from '@nestjs/common';
|
|
44
|
+
import { Observable } from 'rxjs';
|
|
45
|
+
import { tap, catchError } from 'rxjs/operators';
|
|
46
|
+
import { of } from 'rxjs';
|
|
47
|
+
import * as crypto from 'crypto';
|
|
48
|
+
import { ConfigService } from '@nestjs/config';
|
|
49
|
+
|
|
50
|
+
const ALLOWED_FIELDS = new Set([
|
|
51
|
+
'event', 'path', 'referrer', 'screen', 'language', 'timestamp',
|
|
52
|
+
]);
|
|
53
|
+
|
|
54
|
+
const ALLOWED_HOSTS = new Set([
|
|
55
|
+
'<placeholder-eu-analytics-host>',
|
|
56
|
+
'<placeholder-eu-error-tracking-host>',
|
|
57
|
+
]);
|
|
58
|
+
|
|
59
|
+
@Injectable()
|
|
60
|
+
export class TrackingInterceptor implements NestInterceptor {
|
|
61
|
+
private readonly logger = new Logger(TrackingInterceptor.name);
|
|
62
|
+
|
|
63
|
+
constructor(private readonly config: ConfigService) {}
|
|
64
|
+
|
|
65
|
+
intercept(ctx: ExecutionContext, next: CallHandler): Observable<any> {
|
|
66
|
+
const req = ctx.switchToHttp().getRequest();
|
|
67
|
+
const consentRaw = req.cookies?.['cookie-consent'];
|
|
68
|
+
let consent = { necessary: true, analytics: false, marketing: false };
|
|
69
|
+
try {
|
|
70
|
+
if (consentRaw) consent = { ...consent, ...JSON.parse(consentRaw) };
|
|
71
|
+
} catch {}
|
|
72
|
+
|
|
73
|
+
return next.handle().pipe(
|
|
74
|
+
tap(async (data) => {
|
|
75
|
+
if (!consent.analytics) return;
|
|
76
|
+
if (!data?.trackingEvent) return;
|
|
77
|
+
|
|
78
|
+
const event = data.trackingEvent;
|
|
79
|
+
const safe = this.sanitize(event);
|
|
80
|
+
const ipHash = this.ipHash(req);
|
|
81
|
+
|
|
82
|
+
// Fire-and-Forget: Tracker-Crash darf Hauptrequest nicht beeinflussen
|
|
83
|
+
this.forward(safe, ipHash).catch((err) => {
|
|
84
|
+
this.logger.warn(`tracking-forward-failed: ${err.message}`);
|
|
85
|
+
});
|
|
86
|
+
}),
|
|
87
|
+
catchError((err) => {
|
|
88
|
+
// Hauptrequest-Errors propagieren, Tracker-Errors swallowen
|
|
89
|
+
throw err;
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private sanitize(event: any): Record<string, unknown> {
|
|
95
|
+
const out: Record<string, unknown> = {};
|
|
96
|
+
for (const [k, v] of Object.entries(event)) {
|
|
97
|
+
if (ALLOWED_FIELDS.has(k) && (typeof v === 'string' || typeof v === 'number')) {
|
|
98
|
+
out[k] = typeof v === 'string' ? v.slice(0, 500) : v;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private ipHash(req: any): string {
|
|
105
|
+
const ip = req.headers['x-forwarded-for']?.toString().split(',')[0]?.trim()
|
|
106
|
+
?? req.socket?.remoteAddress
|
|
107
|
+
?? '';
|
|
108
|
+
return crypto
|
|
109
|
+
.createHash('sha256')
|
|
110
|
+
.update(ip + this.config.get('IP_HASH_SALT', ''))
|
|
111
|
+
.digest('hex')
|
|
112
|
+
.slice(0, 16);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
private async forward(payload: Record<string, unknown>, visitorHash: string): Promise<void> {
|
|
116
|
+
const endpoint = this.config.get<string>('ANALYTICS_ENDPOINT', '');
|
|
117
|
+
if (!endpoint) return;
|
|
118
|
+
|
|
119
|
+
const host = new URL(endpoint).host;
|
|
120
|
+
if (!ALLOWED_HOSTS.has(host)) {
|
|
121
|
+
this.logger.error(`Tracker-Host ${host} nicht in Allowlist — Forward abgebrochen`);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
await fetch(endpoint, {
|
|
126
|
+
method: 'POST',
|
|
127
|
+
headers: {
|
|
128
|
+
'Content-Type': 'application/json',
|
|
129
|
+
Authorization: `Bearer ${this.config.get('ANALYTICS_TOKEN', '')}`,
|
|
130
|
+
},
|
|
131
|
+
body: JSON.stringify({ ...payload, visitorHash }),
|
|
132
|
+
signal: AbortSignal.timeout(2000),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// File: src/tracking/tracking.module.ts
|
|
140
|
+
import { Module } from '@nestjs/common';
|
|
141
|
+
import { ConfigModule } from '@nestjs/config';
|
|
142
|
+
import { APP_INTERCEPTOR } from '@nestjs/core';
|
|
143
|
+
import { TrackingInterceptor } from './tracking.interceptor';
|
|
144
|
+
|
|
145
|
+
@Module({
|
|
146
|
+
imports: [ConfigModule],
|
|
147
|
+
providers: [
|
|
148
|
+
{ provide: APP_INTERCEPTOR, useClass: TrackingInterceptor },
|
|
149
|
+
],
|
|
150
|
+
})
|
|
151
|
+
export class TrackingModule {}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
// File: src/example/example.controller.ts (Beispiel-Verwendung)
|
|
156
|
+
import { Body, Controller, Post } from '@nestjs/common';
|
|
157
|
+
|
|
158
|
+
@Controller('api/example')
|
|
159
|
+
export class ExampleController {
|
|
160
|
+
@Post('action')
|
|
161
|
+
async doAction(@Body() body: any) {
|
|
162
|
+
// Geschaeftslogik
|
|
163
|
+
const result = await this.businessLogic(body);
|
|
164
|
+
|
|
165
|
+
// Tracker-Event ZUSAMMEN mit Response zurueckgeben
|
|
166
|
+
// Interceptor fired das Event nach Response-Send
|
|
167
|
+
return {
|
|
168
|
+
...result,
|
|
169
|
+
trackingEvent: {
|
|
170
|
+
event: 'action_completed',
|
|
171
|
+
path: '/api/example/action',
|
|
172
|
+
timestamp: new Date().toISOString(),
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
private async businessLogic(_body: any) {
|
|
178
|
+
return { ok: true };
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## AVV / DPA
|
|
184
|
+
|
|
185
|
+
- Tracker-Forward-Provider — AVV Pflicht (Allowlist-Hosts)
|
|
186
|
+
- Logging-Service (NestJS-Logger / Pino-Cloud / Datadog EU) — AVV
|
|
187
|
+
- Hosting-Provider — Art. 28 DSGVO
|
|
188
|
+
|
|
189
|
+
## DSE-Wording-Vorlage
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
### Webanalyse-Forwards
|
|
193
|
+
|
|
194
|
+
Mit Ihrer Einwilligung leiten wir anonymisierte Tracker-Events an unseren
|
|
195
|
+
Analytics-Provider weiter. Vor Versand erfolgt eine zwei-stufige Pruefung:
|
|
196
|
+
|
|
197
|
+
1. **PII-Filter:** Nur folgende Felder werden uebertragen:
|
|
198
|
+
- Event-Name (z.B. `pageview`, `click`)
|
|
199
|
+
- URL-Pfad (ohne Query-String)
|
|
200
|
+
- Referrer-Domain (ohne Pfad)
|
|
201
|
+
- Bildschirm-Aufloesung
|
|
202
|
+
- Sprach-Code
|
|
203
|
+
- Zeitstempel
|
|
204
|
+
|
|
205
|
+
2. **IP-Anonymisierung:** Statt Ihrer IP-Adresse uebertragen wir einen
|
|
206
|
+
gesalzenen Hash (SHA-256, 16 Zeichen), der nicht reversibel ist.
|
|
207
|
+
|
|
208
|
+
**Anbieter:** <placeholder-analytics-provider>, EU-Hosting.
|
|
209
|
+
**Rechtsgrundlage:** Art. 6 Abs. 1 lit. a DSGVO i.V.m. § 25 Abs. 1 TDDDG.
|
|
210
|
+
**Widerruf:** [Cookie-Einstellungen](#cookie-settings) im Footer.
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Verify-Commands (Live-Probe)
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# 1. Tracker-Endpoint Allowlist enforced (Unit-Test)
|
|
217
|
+
# Setze ANALYTICS_ENDPOINT auf nicht-allowlisted Host und triggere Action
|
|
218
|
+
# Erwartung: Log "Tracker-Host X nicht in Allowlist"
|
|
219
|
+
|
|
220
|
+
# 2. PII NICHT im Tracker-Payload
|
|
221
|
+
# Mock fetch und logge Payload bei Provider-Call
|
|
222
|
+
# Erwartung: kein "email", "name", "phone" Feld
|
|
223
|
+
|
|
224
|
+
# 3. Tracker-Crash blockt Hauptrequest nicht
|
|
225
|
+
# Mock fetch mit Error
|
|
226
|
+
curl -X POST https://<placeholder-domain>/api/example/action -d '{}' -i
|
|
227
|
+
# Erwartung: 200/204 trotz Tracker-Fehler
|
|
228
|
+
|
|
229
|
+
# 4. Timeout funktioniert
|
|
230
|
+
# Mock fetch mit 5s-delay
|
|
231
|
+
# Erwartung: AbortError nach 2s, Hauptrequest fertig
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Cross-References
|
|
235
|
+
|
|
236
|
+
- AEGIS-Scanner: `tracking-scan.ts`, `pii-flow-tracker.ts`, `cors-allowlist-checker.ts`
|
|
237
|
+
- Skill-Reference: `references/dsgvo.md` Art. 5 (Daten-Min), Art. 44 (Drittland)
|
|
238
|
+
- BGH-Rechtsprechung: `references/bgh-urteile.md` BGH I ZR 7/16
|
|
239
|
+
- Audit-Pattern: `references/audit-patterns.md` Phase 3 (Drittland-Audit), Phase 6 (Server-Logs)
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: Next.js (Vercel) — Framework
|
|
4
|
+
last-checked: 2026-05-02
|
|
5
|
+
purpose: Pattern fuer Cron-Routes mit Bearer-Auth (Data-Retention, Cleanup, Newsletter-Send).
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Next.js — API-Route Bearer-Auth (Pattern)
|
|
9
|
+
|
|
10
|
+
## 1. Use-Case
|
|
11
|
+
|
|
12
|
+
Cron-getriggerte API-Routes (typisch fuer):
|
|
13
|
+
- Data-Retention-Cleanup (DSGVO Art. 5 lit. e)
|
|
14
|
+
- Newsletter-DOI-Token-Cleanup
|
|
15
|
+
- Audit-Log-Rotation
|
|
16
|
+
- Zombie-Account-Loeschung
|
|
17
|
+
|
|
18
|
+
## 2. Compliance-Risiken
|
|
19
|
+
|
|
20
|
+
| Risiko | Wirkung | Fix |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Cron-Endpoint oeffentlich erreichbar | DDoS-Vektor / Daten-Manipulation | Bearer-Token Pflicht |
|
|
23
|
+
| Token in Code hardcoded | Code-Leak = Bypass | env-driven |
|
|
24
|
+
| Schwacher Token | Brute-Force | mind. 32 random Bytes |
|
|
25
|
+
| Cron-Job laeuft nicht | DSE-Drift Style 2 | Verify-Cron |
|
|
26
|
+
|
|
27
|
+
## 3. Code-Pattern
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
// File: src/app/api/cron/data-retention/route.ts
|
|
31
|
+
import { NextResponse } from 'next/server';
|
|
32
|
+
import { db } from '@/lib/db';
|
|
33
|
+
|
|
34
|
+
export const dynamic = 'force-dynamic';
|
|
35
|
+
|
|
36
|
+
export async function POST(req: Request) {
|
|
37
|
+
// Bearer-Auth (Pflicht)
|
|
38
|
+
const auth = req.headers.get('authorization');
|
|
39
|
+
if (auth !== `Bearer ${process.env.CRON_SECRET}`) {
|
|
40
|
+
return new NextResponse('Unauthorized', { status: 401 });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Data-Retention Logic
|
|
44
|
+
const cutoff = new Date(Date.now() - 90 * 24 * 60 * 60 * 1000); // 90 Tage
|
|
45
|
+
|
|
46
|
+
const result = await db.subscriber.deleteMany({
|
|
47
|
+
where: { confirmedAt: null, createdAt: { lt: cutoff } },
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return NextResponse.json({
|
|
51
|
+
deletedCount: result.count,
|
|
52
|
+
cutoffDate: cutoff.toISOString(),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
# .github/workflows/data-retention.yml (oder vergleichbares CI-System)
|
|
59
|
+
on:
|
|
60
|
+
schedule:
|
|
61
|
+
- cron: '0 3 * * 0' # Sonntag 3 Uhr UTC
|
|
62
|
+
jobs:
|
|
63
|
+
cleanup:
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
steps:
|
|
66
|
+
- run: |
|
|
67
|
+
curl -X POST https://example.com/api/cron/data-retention \
|
|
68
|
+
-H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" \
|
|
69
|
+
-f
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 4. Token-Generierung
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Pflicht: mind. 32 random bytes
|
|
76
|
+
openssl rand -hex 32 > /tmp/cron-secret
|
|
77
|
+
# Setze als ENV-Var in Hosting-Tool + GitHub Secret
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 5. Verify-Commands
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# 1. Endpoint-Auth-Pruefung
|
|
84
|
+
curl -X POST https://example.com/api/cron/data-retention -i
|
|
85
|
+
# Erwartung: 401 Unauthorized
|
|
86
|
+
|
|
87
|
+
curl -X POST https://example.com/api/cron/data-retention \
|
|
88
|
+
-H "Authorization: Bearer wrong-token" -i
|
|
89
|
+
# Erwartung: 401
|
|
90
|
+
|
|
91
|
+
curl -X POST https://example.com/api/cron/data-retention \
|
|
92
|
+
-H "Authorization: Bearer $CRON_SECRET" -i
|
|
93
|
+
# Erwartung: 200 mit deletedCount
|
|
94
|
+
|
|
95
|
+
# 2. Cron-Job laeuft tatsaechlich (Drift-Style-2-Check)
|
|
96
|
+
# Bei GitHub Actions: gh workflow view data-retention --json
|
|
97
|
+
# Bei Dokploy: SSH + crontab -l
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 6. Cross-Reference
|
|
101
|
+
|
|
102
|
+
- DSGVO Art. 5 lit. e: `gesetze/DSGVO/articles.md`
|
|
103
|
+
- Audit-Pattern Phase 4 DSE-Drift Style 2: `audit-patterns.md`
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: Next.js (Vercel) — Framework
|
|
4
|
+
last-checked: 2026-05-02
|
|
5
|
+
purpose: Pattern fuer korrekt-konfigurierte Dynamic-Rendering + Cookie/Headers-Read.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Next.js — Dynamic-Rendering + Headers (Pattern)
|
|
9
|
+
|
|
10
|
+
## 1. Default-Verhalten
|
|
11
|
+
|
|
12
|
+
Next.js (App-Router) versucht **Static-Rendering** wo moeglich. Wenn Component `cookies()`, `headers()`, `searchParams` liest, wird automatisch dynamic.
|
|
13
|
+
|
|
14
|
+
## 2. Compliance-Risiken
|
|
15
|
+
|
|
16
|
+
| Risiko | Wirkung | Fix |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Static-Render mit Veraltetem Stand-Datum | DSE Z. 1 zeigt 2024 obwohl Code 2026 | `force-dynamic` oder ISR |
|
|
19
|
+
| Cookie-Read in Static-Path | Funktion-Aufruf-Fehler in Build | `dynamic = 'force-dynamic'` |
|
|
20
|
+
| GET-Form ohne Headers-Read | CSRF-Anfaelligkeit | `cookies()` auslesen |
|
|
21
|
+
|
|
22
|
+
## 3. Code-Pattern
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
// File: src/app/datenschutz/page.tsx
|
|
26
|
+
export const dynamic = 'force-dynamic'; // Pflicht wenn DSE Stand-Datum aktuell sein muss
|
|
27
|
+
|
|
28
|
+
export default async function DSE() {
|
|
29
|
+
const dseStand = new Date().toLocaleDateString('de-DE', { month: 'long', year: 'numeric' });
|
|
30
|
+
return (
|
|
31
|
+
<main>
|
|
32
|
+
<h1>Datenschutzerklaerung</h1>
|
|
33
|
+
<p>Stand: {dseStand}</p>
|
|
34
|
+
...
|
|
35
|
+
</main>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
// File: src/app/api/csrf/route.ts (CSRF-Token-Handler)
|
|
42
|
+
import { cookies } from 'next/headers';
|
|
43
|
+
import { randomBytes } from 'crypto';
|
|
44
|
+
|
|
45
|
+
export const dynamic = 'force-dynamic';
|
|
46
|
+
|
|
47
|
+
export async function GET() {
|
|
48
|
+
const token = randomBytes(32).toString('hex');
|
|
49
|
+
cookies().set({
|
|
50
|
+
name: 'csrf-token',
|
|
51
|
+
value: token,
|
|
52
|
+
httpOnly: true,
|
|
53
|
+
secure: true,
|
|
54
|
+
sameSite: 'strict',
|
|
55
|
+
path: '/',
|
|
56
|
+
maxAge: 60 * 60,
|
|
57
|
+
});
|
|
58
|
+
return Response.json({ token });
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 4. Anti-Pattern (NICHT)
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
// ❌ NICHT — Static-Render mit hardcoded Datum
|
|
66
|
+
export default function DSE() {
|
|
67
|
+
return <p>Stand: 25.04.2024</p>;
|
|
68
|
+
// Drift-Style 2 (Falschangabe)
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 5. Verify
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Verify dass DSE Stand-Datum aktuell ist
|
|
76
|
+
curl -s https://example.com/datenschutz | grep -oE "Stand:[^<]{0,30}"
|
|
77
|
+
# Erwartung: aktueller Monat
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 6. Cross-Reference
|
|
81
|
+
|
|
82
|
+
- Audit-Pattern Phase 4 (DSE-Drift-Audit, Stand-Datum-Hygiene)
|
|
83
|
+
- audit-patterns.md Phase 4
|