@aegis-scan/skills 0.5.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 +93 -0
- package/package.json +1 -1
- package/sbom.cdx.json +1 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/.claude-plugin/plugin.json +108 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/CHANGELOG.md +878 -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/README.md +9 -3
- package/skills/compliance/aegis-native/brutaler-anwalt/SKILL.md +93 -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 +60 -5
- package/skills/compliance/aegis-native/brutaler-anwalt/references/audit-patterns.md +745 -11
- 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 +106 -30
- package/skills/compliance/aegis-native/brutaler-anwalt/references/branchenrecht.md +247 -2
- package/skills/compliance/aegis-native/brutaler-anwalt/references/checklisten.md +75 -2
- 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 +55 -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/BFSG/audit-relevance.md +39 -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/DDG/audit-relevance.md +28 -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 +4 -1
- 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 +3 -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/HinSchG/articles.md +96 -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 +3 -2
- 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 +71 -3
- 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/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 +115 -9
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/INDEX.md +1 -1
- 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/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/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/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/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/DSFA-template.md +80 -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-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 +190 -48
- 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/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-quality-gates/SKILL.md +1 -1
- 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
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: Next.js (Vercel) — Framework
|
|
4
|
+
last-checked: 2026-05-02
|
|
5
|
+
purpose: Pattern fuer ENV-Driven Tracking-Loading mit Build-Arg-Pitfall-Schutz.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Next.js — ENV-Driven Tracking (Pattern)
|
|
9
|
+
|
|
10
|
+
## 1. Default-Verhalten / Pitfalls
|
|
11
|
+
|
|
12
|
+
`NEXT_PUBLIC_*`-ENV-Vars werden zur **Build-Zeit** im Client-Bundle eingelogged (string-replace).
|
|
13
|
+
Wenn das Deployment-Tool (Dokploy / Coolify / Nixpacks / Railway) die ENV nur als
|
|
14
|
+
**Runtime-ENV** durchreicht aber nicht als `--build-arg` weitergibt, landet `undefined` im Bundle.
|
|
15
|
+
|
|
16
|
+
## 2. Compliance-Risiken
|
|
17
|
+
|
|
18
|
+
| Risiko | Wirkung | Fix |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Build-Arg-Pitfall | Tracker-URL leer → Tracker laeuft nicht | Build-Arg-Konfiguration |
|
|
21
|
+
| Tracker laedt vor Consent | § 25 TDDDG-Verstoss | ConsentGate |
|
|
22
|
+
| Tracker-URL hardcoded | Drift bei Subdomain-Wechsel | env-driven mit Default |
|
|
23
|
+
| Bundle leakt Brand-Codename | Public-OPSec-Issue | env-driven mit Brand-eigener Subdomain |
|
|
24
|
+
|
|
25
|
+
## 3. Code-Pattern (sanitized)
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// File: src/components/analytics/UmamiScript.tsx
|
|
29
|
+
'use client';
|
|
30
|
+
|
|
31
|
+
import Script from 'next/script';
|
|
32
|
+
import { useConsent } from '@/lib/consent';
|
|
33
|
+
|
|
34
|
+
const ANALYTICS_HOST = (
|
|
35
|
+
process.env.UMAMI_HOST ||
|
|
36
|
+
process.env.NEXT_PUBLIC_ANALYTICS_HOST ||
|
|
37
|
+
'https://metrics.example.com' // Default = Brand-eigene Subdomain
|
|
38
|
+
).replace(/\/+$/, '');
|
|
39
|
+
|
|
40
|
+
const WEBSITE_ID = process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID;
|
|
41
|
+
|
|
42
|
+
export default function UmamiScript() {
|
|
43
|
+
const { hasConsented } = useConsent();
|
|
44
|
+
|
|
45
|
+
if (!hasConsented('analytics') || !WEBSITE_ID) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Script
|
|
51
|
+
defer
|
|
52
|
+
src={`${ANALYTICS_HOST}/script.js`}
|
|
53
|
+
data-website-id={WEBSITE_ID}
|
|
54
|
+
strategy="afterInteractive"
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```dockerfile
|
|
61
|
+
# Dockerfile (builder-Stage)
|
|
62
|
+
FROM node:22-alpine AS builder
|
|
63
|
+
|
|
64
|
+
# Pflicht: NEXT_PUBLIC_*-Vars muessen ARG + ENV im Build-Stage sein
|
|
65
|
+
ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
|
|
66
|
+
ARG NEXT_PUBLIC_ANALYTICS_HOST
|
|
67
|
+
ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID=$NEXT_PUBLIC_UMAMI_WEBSITE_ID
|
|
68
|
+
ENV NEXT_PUBLIC_ANALYTICS_HOST=$NEXT_PUBLIC_ANALYTICS_HOST
|
|
69
|
+
|
|
70
|
+
# ... rest
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
# Dokploy Build-Args (oder vergleichbares Tool)
|
|
75
|
+
buildArgs:
|
|
76
|
+
NEXT_PUBLIC_UMAMI_WEBSITE_ID: "abc-123"
|
|
77
|
+
NEXT_PUBLIC_ANALYTICS_HOST: "https://metrics.example.com"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 4. Server-Component-Variante (besser, kein Bundle-Leak)
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
// File: src/app/layout.tsx (Server-Component)
|
|
84
|
+
import { headers } from 'next/headers';
|
|
85
|
+
|
|
86
|
+
export default async function RootLayout({ children }) {
|
|
87
|
+
const analyticsHost = process.env.UMAMI_HOST; // server-only, kein NEXT_PUBLIC_
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<html>
|
|
91
|
+
<head>
|
|
92
|
+
{analyticsHost && (
|
|
93
|
+
<script
|
|
94
|
+
defer
|
|
95
|
+
src={`${analyticsHost}/script.js`}
|
|
96
|
+
data-website-id={process.env.UMAMI_WEBSITE_ID}
|
|
97
|
+
/>
|
|
98
|
+
)}
|
|
99
|
+
</head>
|
|
100
|
+
<body>{children}</body>
|
|
101
|
+
</html>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Server-Component-Variante:
|
|
107
|
+
- Keine NEXT_PUBLIC_-Pflicht (server-only env)
|
|
108
|
+
- Container-Runtime-ENV reicht (kein Build-Arg)
|
|
109
|
+
- Kein Code-Var-Leak im Public-Bundle
|
|
110
|
+
|
|
111
|
+
## 5. DSE-Wording-Vorlage
|
|
112
|
+
|
|
113
|
+
> Wir verwenden Umami (selbst-gehostete Webanalyse) auf `metrics.example.com`. Daten
|
|
114
|
+
> werden ohne Cookies erhoben + ohne Personenbezug ueber DAU-Hash. Erhebung erfolgt
|
|
115
|
+
> mit Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO + § 25 Abs. 1 TDDDG).
|
|
116
|
+
|
|
117
|
+
## 6. Verify-Commands
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# 1. Bundle-Check (NEXT_PUBLIC_-Pfad)
|
|
121
|
+
docker exec <container> grep -rE "metrics.example.com|UMAMI_WEBSITE_ID" \
|
|
122
|
+
/app/.next/server/chunks/ /app/.next/static/ 2>&1 | head -3
|
|
123
|
+
|
|
124
|
+
# 2. SSR-Render-Check (Server-Component-Pfad)
|
|
125
|
+
curl -s https://example.com | grep -oE 'metrics.example.com'
|
|
126
|
+
|
|
127
|
+
# 3. Pre-Consent-Loading-Pruefung
|
|
128
|
+
curl -s https://example.com | grep -oE '<script[^>]*metrics.example.com[^>]*>'
|
|
129
|
+
# Erwartung: kein direkter Script-Tag ohne ConsentGate-Wrapper
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 7. Az.-Anker
|
|
133
|
+
|
|
134
|
+
- EuGH C-673/17 Planet49 (Cookie-Einwilligung)
|
|
135
|
+
- BGH I ZR 7/16 (DSGVO-Pflichtinformation als UWG-Schutzgesetz)
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: Ruby on Rails (Open-Source)
|
|
4
|
+
last-checked: 2026-05-05
|
|
5
|
+
purpose: Rails Cookies-Helper + Concern-Pattern fuer Tracker-Authorization.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Rails — Cookie-Banner (Pattern)
|
|
9
|
+
|
|
10
|
+
## Trigger / Detection
|
|
11
|
+
|
|
12
|
+
Repo enthaelt:
|
|
13
|
+
- `rails` in `Gemfile` (Version >= 7.x empfohlen)
|
|
14
|
+
- `app/controllers/application_controller.rb`
|
|
15
|
+
- `app/views/layouts/application.html.erb`
|
|
16
|
+
- Optional: `app/javascript/` (Hotwire/Stimulus) oder Webpacker
|
|
17
|
+
- Optional: `config/initializers/cookies_serializer.rb`
|
|
18
|
+
|
|
19
|
+
## Default-Verhalten (was passiert ohne Konfiguration)
|
|
20
|
+
|
|
21
|
+
- Default `cookies` Helper signiert/verschluesselt Cookies → Banner-JS kann nicht lesen
|
|
22
|
+
- Tracker-Tags in `application.html.erb` `<head>` direkt eingebunden
|
|
23
|
+
- Session-Cookie ohne explizite `same_site` Setzung
|
|
24
|
+
- Cookies ohne `secure: true` Default in Development → Drift zu Prod
|
|
25
|
+
- Default-Logger schreibt Klartext-IP
|
|
26
|
+
|
|
27
|
+
## Compliance-Risiken
|
|
28
|
+
|
|
29
|
+
| Risiko | Norm | Severity | Fix |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| Tracker-Tag in Layout-`<head>` | § 25 TDDDG | KRITISCH | Conditional `if cookies[:consent]&.dig('analytics')` |
|
|
32
|
+
| Encrypted Consent-Cookie unleserlich fuer JS | UX/DSGVO | MITTEL | Plain `cookies[:cookie_consent]` (nicht signed) |
|
|
33
|
+
| Session-Cookie ohne SameSite | Art. 32 DSGVO | HOCH | `config.action_dispatch.cookies_same_site_protection = :lax` |
|
|
34
|
+
| Klartext-IP in Production-Log | Art. 5 lit. f | HOCH | Custom `Rails.logger` Filter |
|
|
35
|
+
| `protect_from_forgery` nicht erzwungen | Art. 32 DSGVO | KRITISCH | nicht `with: :null_session` global |
|
|
36
|
+
|
|
37
|
+
## Code-Pattern (sanitized)
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
# File: config/initializers/cookies.rb
|
|
41
|
+
Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
|
|
42
|
+
Rails.application.config.action_dispatch.use_cookies_with_metadata = true
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
# File: app/controllers/concerns/consent_concern.rb
|
|
47
|
+
module ConsentConcern
|
|
48
|
+
extend ActiveSupport::Concern
|
|
49
|
+
|
|
50
|
+
CONSENT_DEFAULT = {
|
|
51
|
+
'necessary' => true,
|
|
52
|
+
'analytics' => false,
|
|
53
|
+
'marketing' => false
|
|
54
|
+
}.freeze
|
|
55
|
+
|
|
56
|
+
included do
|
|
57
|
+
helper_method :user_consent, :analytics_consented?, :marketing_consented?
|
|
58
|
+
before_action :load_consent
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def user_consent
|
|
62
|
+
@user_consent ||= CONSENT_DEFAULT
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def analytics_consented?
|
|
66
|
+
user_consent['analytics'] == true
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def marketing_consented?
|
|
70
|
+
user_consent['marketing'] == true
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
private
|
|
74
|
+
|
|
75
|
+
def load_consent
|
|
76
|
+
raw = cookies[:cookie_consent]
|
|
77
|
+
return unless raw
|
|
78
|
+
|
|
79
|
+
parsed = JSON.parse(raw) rescue nil
|
|
80
|
+
return unless parsed.is_a?(Hash)
|
|
81
|
+
|
|
82
|
+
@user_consent = CONSENT_DEFAULT.merge(parsed)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
```ruby
|
|
88
|
+
# File: app/controllers/application_controller.rb
|
|
89
|
+
class ApplicationController < ActionController::Base
|
|
90
|
+
include ConsentConcern
|
|
91
|
+
|
|
92
|
+
protect_from_forgery with: :exception
|
|
93
|
+
|
|
94
|
+
before_action :set_security_headers
|
|
95
|
+
|
|
96
|
+
private
|
|
97
|
+
|
|
98
|
+
def set_security_headers
|
|
99
|
+
response.headers['X-Content-Type-Options'] = 'nosniff'
|
|
100
|
+
response.headers['Referrer-Policy'] = 'strict-origin-when-cross-origin'
|
|
101
|
+
response.headers['Permissions-Policy'] = 'geolocation=(), camera=(), microphone=()'
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```ruby
|
|
107
|
+
# File: app/controllers/consent_controller.rb
|
|
108
|
+
class ConsentController < ApplicationController
|
|
109
|
+
skip_before_action :verify_authenticity_token, only: [:create], if: -> { csrf_token_via_header? }
|
|
110
|
+
|
|
111
|
+
def create
|
|
112
|
+
consent = consent_params.merge(
|
|
113
|
+
'necessary' => true,
|
|
114
|
+
'version' => '1.0',
|
|
115
|
+
'timestamp' => Time.current.iso8601
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
# Server-Log fuer Nachweispflicht
|
|
119
|
+
ConsentLog.create!(
|
|
120
|
+
ip_hash: ip_hash(request.remote_ip),
|
|
121
|
+
user_agent: (request.user_agent || '').first(200),
|
|
122
|
+
consent: consent.to_json
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
cookies[:cookie_consent] = {
|
|
126
|
+
value: consent.to_json,
|
|
127
|
+
expires: 12.months.from_now,
|
|
128
|
+
secure: Rails.env.production?,
|
|
129
|
+
httponly: false, # Banner-JS muss lesen
|
|
130
|
+
same_site: :lax,
|
|
131
|
+
path: '/'
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
head :no_content
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
private
|
|
138
|
+
|
|
139
|
+
def consent_params
|
|
140
|
+
params.require(:consent).permit(:analytics, :marketing).to_h.transform_values { |v| v == true || v == 'true' }
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def ip_hash(ip)
|
|
144
|
+
salt = Rails.application.credentials.dig(:ip_hash_salt) || ''
|
|
145
|
+
Digest::SHA256.hexdigest(ip + salt)[0...16]
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def csrf_token_via_header?
|
|
149
|
+
request.headers['X-CSRF-Token'].present?
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```ruby
|
|
155
|
+
# File: config/routes.rb (Auszug)
|
|
156
|
+
Rails.application.routes.draw do
|
|
157
|
+
resource :consent, only: [:create]
|
|
158
|
+
# ...
|
|
159
|
+
end
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```erb
|
|
163
|
+
<%# File: app/views/layouts/_cookie_banner.html.erb %>
|
|
164
|
+
<% unless cookies[:cookie_consent] %>
|
|
165
|
+
<aside id="cookie-banner" role="dialog" aria-label="Cookie-Einwilligung" class="cookie-banner">
|
|
166
|
+
<p>
|
|
167
|
+
Wir nutzen Cookies fuer notwendige Funktionen. Mit Ihrer Einwilligung
|
|
168
|
+
zusaetzlich fuer Webanalyse. Details:
|
|
169
|
+
<%= link_to 'Datenschutzerklaerung', privacy_path %>.
|
|
170
|
+
</p>
|
|
171
|
+
<div class="cookie-actions">
|
|
172
|
+
<button type="button" data-action="reject-all" class="btn-secondary">
|
|
173
|
+
Nur Notwendige
|
|
174
|
+
</button>
|
|
175
|
+
<button type="button" data-action="accept-all" class="btn-primary">
|
|
176
|
+
Alle akzeptieren
|
|
177
|
+
</button>
|
|
178
|
+
</div>
|
|
179
|
+
</aside>
|
|
180
|
+
|
|
181
|
+
<script>
|
|
182
|
+
(() => {
|
|
183
|
+
const csrf = document.querySelector('meta[name="csrf-token"]')?.content;
|
|
184
|
+
const submit = (analytics, marketing) => {
|
|
185
|
+
fetch('<%= consent_path %>', {
|
|
186
|
+
method: 'POST',
|
|
187
|
+
headers: {
|
|
188
|
+
'Content-Type': 'application/json',
|
|
189
|
+
'X-CSRF-Token': csrf,
|
|
190
|
+
Accept: 'application/json'
|
|
191
|
+
},
|
|
192
|
+
body: JSON.stringify({ consent: { analytics, marketing } })
|
|
193
|
+
}).then(() => {
|
|
194
|
+
document.getElementById('cookie-banner').remove();
|
|
195
|
+
if (analytics) {
|
|
196
|
+
const s = document.createElement('script');
|
|
197
|
+
s.src = 'https://<placeholder-eu-analytics-host>/script.js';
|
|
198
|
+
s.async = true;
|
|
199
|
+
document.head.appendChild(s);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
document.querySelector('[data-action="reject-all"]').onclick = () => submit(false, false);
|
|
205
|
+
document.querySelector('[data-action="accept-all"]').onclick = () => submit(true, true);
|
|
206
|
+
})();
|
|
207
|
+
</script>
|
|
208
|
+
<% end %>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
```erb
|
|
212
|
+
<%# File: app/views/layouts/application.html.erb %>
|
|
213
|
+
<!DOCTYPE html>
|
|
214
|
+
<html lang="de">
|
|
215
|
+
<head>
|
|
216
|
+
<meta charset="utf-8">
|
|
217
|
+
<%= csrf_meta_tags %>
|
|
218
|
+
<%= csp_meta_tag %>
|
|
219
|
+
<title><%= content_for?(:title) ? yield(:title) : '<placeholder-site-name>' %></title>
|
|
220
|
+
|
|
221
|
+
<%# Tracker NUR conditional %>
|
|
222
|
+
<% if analytics_consented? %>
|
|
223
|
+
<script src="https://<placeholder-eu-analytics-host>/script.js" async></script>
|
|
224
|
+
<% end %>
|
|
225
|
+
</head>
|
|
226
|
+
<body>
|
|
227
|
+
<%= yield %>
|
|
228
|
+
<%= render 'layouts/cookie_banner' %>
|
|
229
|
+
</body>
|
|
230
|
+
</html>
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## AVV / DPA
|
|
234
|
+
|
|
235
|
+
- Hosting-Provider (Heroku EU / Fly.io / Render) — Art. 28 DSGVO
|
|
236
|
+
- Datenbank (Postgres EU / RDS Frankfurt) — AVV
|
|
237
|
+
- Analytics-Provider (Plausible EU / Matomo) — AVV
|
|
238
|
+
- Mailer (SES EU / Postmark) — AVV
|
|
239
|
+
|
|
240
|
+
## DSE-Wording-Vorlage
|
|
241
|
+
|
|
242
|
+
```markdown
|
|
243
|
+
### Cookies (Rails-Anwendung)
|
|
244
|
+
|
|
245
|
+
Diese Webseite verwendet folgende Cookies:
|
|
246
|
+
|
|
247
|
+
**Notwendige Cookies:**
|
|
248
|
+
- `_<placeholder-app>_session` — Session-Verwaltung, Session-Dauer (signed/encrypted)
|
|
249
|
+
- `_csrf_token` — CSRF-Schutz, Session-Dauer
|
|
250
|
+
- `cookie_consent` — Speicherung Ihrer Einwilligung, 12 Monate (Klartext-JSON, damit JS lesen kann)
|
|
251
|
+
|
|
252
|
+
**Analyse-Cookies (Opt-In, mit Einwilligung):**
|
|
253
|
+
- gesetzt durch <placeholder-analytics-provider>
|
|
254
|
+
- Speicherdauer: <placeholder-days> Tage
|
|
255
|
+
- EU-Hosting: <placeholder-eu-country>
|
|
256
|
+
|
|
257
|
+
**Rechtsgrundlage:** § 25 TDDDG i.V.m. Art. 6 Abs. 1 lit. a DSGVO
|
|
258
|
+
(fuer Opt-In-Cookies) bzw. lit. f DSGVO (fuer notwendige Cookies).
|
|
259
|
+
**Widerruf:** [Cookie-Einstellungen](#cookie-settings) im Footer.
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Verify-Commands (Live-Probe)
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# 1. Banner sichtbar bei Erstbesuch
|
|
266
|
+
curl -sS https://<placeholder-domain>/ | grep -ic "cookie-banner"
|
|
267
|
+
|
|
268
|
+
# 2. cookie_consent NICHT signed (JS-readable)
|
|
269
|
+
curl -X POST https://<placeholder-domain>/consent \
|
|
270
|
+
-H "Content-Type: application/json" \
|
|
271
|
+
-H "X-CSRF-Token: <placeholder-csrf>" \
|
|
272
|
+
-d '{"consent":{"analytics":false,"marketing":false}}' -i \
|
|
273
|
+
| grep -i "set-cookie:.*cookie_consent"
|
|
274
|
+
# Erwartung: JSON-String, NICHT base64-encrypted
|
|
275
|
+
|
|
276
|
+
# 3. Tracker erst nach Consent
|
|
277
|
+
curl -sS https://<placeholder-domain>/ | grep -ic "<placeholder-eu-analytics-host>"
|
|
278
|
+
# Erwartung: 0
|
|
279
|
+
|
|
280
|
+
curl -sS -H 'Cookie: cookie_consent=%7B%22analytics%22%3Atrue%7D' https://<placeholder-domain>/ \
|
|
281
|
+
| grep -ic "<placeholder-eu-analytics-host>"
|
|
282
|
+
# Erwartung: >=1
|
|
283
|
+
|
|
284
|
+
# 4. Security-Headers
|
|
285
|
+
curl -sI https://<placeholder-domain>/ | grep -iE "x-content-type-options|referrer-policy"
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Cross-References
|
|
289
|
+
|
|
290
|
+
- AEGIS-Scanner: `cookie-flags-checker.ts`, `consent-flow-checker.ts`, `csrf-config-checker.ts`
|
|
291
|
+
- Skill-Reference: `references/dsgvo.md` § 25 TDDDG, Art. 7 DSGVO
|
|
292
|
+
- BGH-Rechtsprechung: `references/bgh-urteile.md` BGH I ZR 7/16
|
|
293
|
+
- OLG Koeln 6 U 80/23 (Button-Gleichwertigkeit)
|
|
294
|
+
- Audit-Pattern: `references/audit-patterns.md` Phase 2 (Cookie-Audit)
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: Ruby on Rails + Devise (Open-Source)
|
|
4
|
+
last-checked: 2026-05-05
|
|
5
|
+
purpose: Devise + § 26 BDSG-konforme User-Verwaltung mit Audit-Trail.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Rails + Devise — DSGVO-Pattern
|
|
9
|
+
|
|
10
|
+
## Trigger / Detection
|
|
11
|
+
|
|
12
|
+
Repo enthaelt:
|
|
13
|
+
- `gem 'devise'` in `Gemfile`
|
|
14
|
+
- `app/models/user.rb` mit `devise :database_authenticatable, ...`
|
|
15
|
+
- `config/initializers/devise.rb`
|
|
16
|
+
- Migration mit `:lockable, :trackable, :timeoutable` Feldern
|
|
17
|
+
- Optional: `gem 'pundit'` / `gem 'cancancan'` fuer Authorization
|
|
18
|
+
|
|
19
|
+
## Default-Verhalten (was passiert ohne Konfiguration)
|
|
20
|
+
|
|
21
|
+
- Devise loggt `last_sign_in_ip`, `current_sign_in_ip` als Klartext → Art. 5 lit. f Verstoss
|
|
22
|
+
- Default-Confirmable-Token-Lifetime ungesetzt → unbegrenzte Confirmation-Tokens
|
|
23
|
+
- Failed-Login-Errors leaken User-Existence ("Email not found")
|
|
24
|
+
- Default-Password-Length 6 Zeichen → zu schwach
|
|
25
|
+
- `:rememberable` ohne Expiration → Permanent-Sessions
|
|
26
|
+
|
|
27
|
+
## Compliance-Risiken
|
|
28
|
+
|
|
29
|
+
| Risiko | Norm | Severity | Fix |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| `last_sign_in_ip` Klartext | Art. 5 lit. f DSGVO | KRITISCH | Custom-Setter mit Hash |
|
|
32
|
+
| User-Enumeration via Devise-Errors | Art. 32 DSGVO | HOCH | `paranoid: true` setzen |
|
|
33
|
+
| Password-Length 6 | Art. 32 DSGVO | HOCH | `password_length: 12..128` |
|
|
34
|
+
| Remember-Me unbegrenzt | Art. 32 DSGVO | MITTEL | `remember_for: 14.days` |
|
|
35
|
+
| Audit-Log fuer Account-aenderungen fehlt | Art. 5 Abs. 2 | HOCH | `audited` Gem oder Custom |
|
|
36
|
+
| `current_password`-Check fuer kritische Aktionen | Art. 32 DSGVO | HOCH | `before_action :require_recent_auth` |
|
|
37
|
+
|
|
38
|
+
## Code-Pattern (sanitized)
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
# File: config/initializers/devise.rb
|
|
42
|
+
Devise.setup do |config|
|
|
43
|
+
config.mailer_sender = '<placeholder-noreply-email>'
|
|
44
|
+
|
|
45
|
+
config.password_length = 12..128
|
|
46
|
+
|
|
47
|
+
# Bestaetigungs-Token: 7 Tage, danach abgelaufen
|
|
48
|
+
config.confirm_within = 7.days
|
|
49
|
+
|
|
50
|
+
# Lockable: 5 Versuche, 30 Minuten Lock
|
|
51
|
+
config.maximum_attempts = 5
|
|
52
|
+
config.unlock_in = 30.minutes
|
|
53
|
+
config.unlock_strategy = :time
|
|
54
|
+
|
|
55
|
+
# Timeoutable: Auto-Logout nach 60 min Inaktivitaet
|
|
56
|
+
config.timeout_in = 60.minutes
|
|
57
|
+
|
|
58
|
+
# Rememberable: max. 14 Tage
|
|
59
|
+
config.remember_for = 14.days
|
|
60
|
+
config.expire_all_remember_me_on_sign_out = true
|
|
61
|
+
|
|
62
|
+
# paranoid: kein User-Enumeration via Reset-Password-Form
|
|
63
|
+
config.paranoid = true
|
|
64
|
+
|
|
65
|
+
# Argon2 / bcrypt-Cost auf >= 12
|
|
66
|
+
config.stretches = Rails.env.test? ? 1 : 12
|
|
67
|
+
|
|
68
|
+
# Reset-Password-Token: 6 Stunden
|
|
69
|
+
config.reset_password_within = 6.hours
|
|
70
|
+
end
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```ruby
|
|
74
|
+
# File: app/models/user.rb
|
|
75
|
+
class User < ApplicationRecord
|
|
76
|
+
devise :database_authenticatable, :registerable,
|
|
77
|
+
:recoverable, :rememberable, :validatable,
|
|
78
|
+
:confirmable, :lockable, :timeoutable, :trackable
|
|
79
|
+
|
|
80
|
+
has_many :user_audit_logs, dependent: :destroy
|
|
81
|
+
has_many :user_legal_acceptances, dependent: :destroy
|
|
82
|
+
|
|
83
|
+
validates :name, length: { maximum: 100 }, allow_blank: true
|
|
84
|
+
|
|
85
|
+
# Anonymisierungs-Felder ueberschreiben statt loeschen
|
|
86
|
+
def anonymize!
|
|
87
|
+
update!(
|
|
88
|
+
email: "deleted-#{id}@<placeholder-domain>",
|
|
89
|
+
name: 'GELOESCHT',
|
|
90
|
+
phone: nil,
|
|
91
|
+
last_sign_in_ip_hash: nil,
|
|
92
|
+
current_sign_in_ip_hash: nil,
|
|
93
|
+
sign_in_count: 0
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Hash IP statt Klartext (override Devise-Default)
|
|
98
|
+
def update_tracked_fields!(request)
|
|
99
|
+
super
|
|
100
|
+
self.current_sign_in_ip = nil # explicit nil
|
|
101
|
+
self.last_sign_in_ip = nil
|
|
102
|
+
self.current_sign_in_ip_hash = ip_hash(request.remote_ip)
|
|
103
|
+
save(validate: false)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
private
|
|
107
|
+
|
|
108
|
+
def ip_hash(ip)
|
|
109
|
+
return nil if ip.blank?
|
|
110
|
+
salt = Rails.application.credentials.dig(:ip_hash_salt) || ''
|
|
111
|
+
Digest::SHA256.hexdigest(ip + salt)[0...16]
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```ruby
|
|
117
|
+
# File: db/migrate/2026_05_05_add_dsgvo_fields_to_users.rb
|
|
118
|
+
class AddDsgvoFieldsToUsers < ActiveRecord::Migration[7.1]
|
|
119
|
+
def change
|
|
120
|
+
add_column :users, :current_sign_in_ip_hash, :string, limit: 16
|
|
121
|
+
add_column :users, :last_sign_in_ip_hash, :string, limit: 16
|
|
122
|
+
add_column :users, :anonymized_at, :datetime
|
|
123
|
+
add_index :users, :anonymized_at
|
|
124
|
+
|
|
125
|
+
# Loesche Klartext-IP-Felder (oder lasse sie als deprecated)
|
|
126
|
+
# remove_column :users, :current_sign_in_ip, :inet # vorsichtig!
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```ruby
|
|
132
|
+
# File: app/models/user_audit_log.rb
|
|
133
|
+
class UserAuditLog < ApplicationRecord
|
|
134
|
+
belongs_to :user
|
|
135
|
+
|
|
136
|
+
validates :action, presence: true, inclusion: {
|
|
137
|
+
in: %w[
|
|
138
|
+
sign_in sign_out registration confirmation password_change
|
|
139
|
+
email_change profile_update consent_change account_deletion
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
before_destroy { raise 'Audit-Log ist append-only' }
|
|
144
|
+
|
|
145
|
+
def self.log!(user, action, ip:, user_agent:)
|
|
146
|
+
salt = Rails.application.credentials.dig(:ip_hash_salt) || ''
|
|
147
|
+
create!(
|
|
148
|
+
user: user,
|
|
149
|
+
action: action,
|
|
150
|
+
ip_hash: Digest::SHA256.hexdigest((ip || '') + salt)[0...16],
|
|
151
|
+
user_agent: (user_agent || '').first(200),
|
|
152
|
+
occurred_at: Time.current
|
|
153
|
+
)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
```ruby
|
|
159
|
+
# File: app/controllers/users/sessions_controller.rb
|
|
160
|
+
class Users::SessionsController < Devise::SessionsController
|
|
161
|
+
def create
|
|
162
|
+
super do |user|
|
|
163
|
+
UserAuditLog.log!(user, 'sign_in', ip: request.remote_ip, user_agent: request.user_agent)
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def destroy
|
|
168
|
+
user = current_user
|
|
169
|
+
super do
|
|
170
|
+
UserAuditLog.log!(user, 'sign_out', ip: request.remote_ip, user_agent: request.user_agent) if user
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
```ruby
|
|
177
|
+
# File: app/controllers/concerns/recent_auth_concern.rb
|
|
178
|
+
module RecentAuthConcern
|
|
179
|
+
extend ActiveSupport::Concern
|
|
180
|
+
|
|
181
|
+
RECENT_AUTH_WINDOW = 5.minutes
|
|
182
|
+
|
|
183
|
+
def require_recent_auth
|
|
184
|
+
return if recent_auth?
|
|
185
|
+
session[:return_to] = request.fullpath
|
|
186
|
+
redirect_to new_user_confirm_password_path,
|
|
187
|
+
alert: 'Bitte bestaetigen Sie Ihr Passwort erneut'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
def recent_auth?
|
|
191
|
+
session[:recent_auth_at].present? &&
|
|
192
|
+
Time.zone.at(session[:recent_auth_at]) > RECENT_AUTH_WINDOW.ago
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## AVV / DPA
|
|
198
|
+
|
|
199
|
+
- Datenbank (Postgres EU) — AVV mit IP-Hash-Garantie
|
|
200
|
+
- Mailer (SES EU / Postmark / Mailgun EU) — AVV
|
|
201
|
+
- Optional: SSO-Provider (Auth0 EU / Keycloak self-host) — AVV mit Drittland-TIA
|
|
202
|
+
|
|
203
|
+
## DSE-Wording-Vorlage
|
|
204
|
+
|
|
205
|
+
```markdown
|
|
206
|
+
### Account-Anlage und Anmeldung
|
|
207
|
+
|
|
208
|
+
Bei Registrierung und Anmeldung verarbeiten wir folgende Daten:
|
|
209
|
+
|
|
210
|
+
- E-Mail-Adresse (Pflichtfeld, zur Identifizierung)
|
|
211
|
+
- Name (optional)
|
|
212
|
+
- Passwort (gespeichert als bcrypt-Hash mit Cost-Faktor 12)
|
|
213
|
+
- Hash der IP-Adresse (zur Brute-Force-Erkennung; SHA-256 mit Salt, 16 Zeichen)
|
|
214
|
+
- Anzahl Anmeldungen
|
|
215
|
+
- Letzter Anmelde-Zeitpunkt
|
|
216
|
+
- User-Agent (max. 200 Zeichen)
|
|
217
|
+
|
|
218
|
+
**Audit-Log:** Wir protokollieren Anmeldungen, Passwort-aenderungen,
|
|
219
|
+
Profil-aenderungen und Account-Loeschungen mit anonymisierter IP zur
|
|
220
|
+
Sicherheits-Auswertung.
|
|
221
|
+
|
|
222
|
+
**Rechtsgrundlage:** Art. 6 Abs. 1 lit. b DSGVO (Vertrag) +
|
|
223
|
+
Art. 6 Abs. 1 lit. f DSGVO (Sicherheit).
|
|
224
|
+
**Speicherdauer:**
|
|
225
|
+
- Account: bis Loeschung (manuell oder via Inaktivitaets-Cleanup nach 2 Jahren)
|
|
226
|
+
- Audit-Log: 90 Tage
|
|
227
|
+
- Failed-Login-Counter: 30 Minuten (Lockout-Window)
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Verify-Commands (Live-Probe)
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# 1. paranoid-Mode aktiv (kein User-Enumeration)
|
|
234
|
+
curl -X POST https://<placeholder-domain>/users/password \
|
|
235
|
+
-H "Content-Type: application/json" \
|
|
236
|
+
-d '{"user":{"email":"nonexistent@example.com"}}' -i
|
|
237
|
+
# Erwartung: 200 mit "If your email exists..." (statt "Email not found")
|
|
238
|
+
|
|
239
|
+
# 2. Account-Lockout nach 5 Versuchen
|
|
240
|
+
for i in {1..6}; do
|
|
241
|
+
curl -X POST https://<placeholder-domain>/users/sign_in \
|
|
242
|
+
-d 'user[email]=<placeholder-user-email>&user[password]=wrong' -s -o /dev/null -w "%{http_code}\n"
|
|
243
|
+
done
|
|
244
|
+
# Erwartung: letzter Code zeigt Account-Lockout
|
|
245
|
+
|
|
246
|
+
# 3. IP-Hash statt Klartext
|
|
247
|
+
# DB-Query: SELECT current_sign_in_ip_hash, current_sign_in_ip FROM users WHERE id = '<test>';
|
|
248
|
+
# Erwartung: ip_hash gefuellt, ip-Feld NULL/leer
|
|
249
|
+
|
|
250
|
+
# 4. Password-Length-Enforcement
|
|
251
|
+
curl -X POST https://<placeholder-domain>/users \
|
|
252
|
+
-d 'user[email]=test@test.com&user[password]=short' -i
|
|
253
|
+
# Erwartung: 422 mit "Password is too short (minimum is 12 characters)"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Cross-References
|
|
257
|
+
|
|
258
|
+
- AEGIS-Scanner: `auth-flow-checker.ts`, `password-policy-checker.ts`, `audit-trail-checker.ts`
|
|
259
|
+
- Skill-Reference: `references/dsgvo.md` Art. 32 (Sicherheit), Art. 5 lit. f (Vertraulichkeit)
|
|
260
|
+
- BDSG: § 26 Abs. 8 (Beschaeftigtendaten — bei Mitarbeiter-Accounts)
|
|
261
|
+
- BGH-Rechtsprechung: `references/bgh-urteile.md`
|
|
262
|
+
- Audit-Pattern: `references/audit-patterns.md` Phase 9 (Auth-Audit)
|