@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,265 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: NestJS + Passport (Open-Source)
|
|
4
|
+
last-checked: 2026-05-05
|
|
5
|
+
purpose: NestJS Auth-Pattern mit Passport-Strategy + DSGVO-konformer Session-Verwaltung.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# NestJS — Auth-Pattern (Passport + DSGVO-Sessions)
|
|
9
|
+
|
|
10
|
+
## Trigger / Detection
|
|
11
|
+
|
|
12
|
+
Repo enthaelt:
|
|
13
|
+
- `@nestjs/passport`, `@nestjs/jwt` in Dependencies
|
|
14
|
+
- `*Strategy.ts` (LocalStrategy, JwtStrategy, OAuth2Strategy)
|
|
15
|
+
- `AuthModule`, `AuthService`, `AuthGuard`
|
|
16
|
+
- Optional: `bcrypt` / `argon2` fuer Password-Hashing
|
|
17
|
+
- Optional: `@nestjs/throttler` fuer Rate-Limiting
|
|
18
|
+
|
|
19
|
+
## Default-Verhalten (was passiert ohne Konfiguration)
|
|
20
|
+
|
|
21
|
+
- Passport-Default speichert Session-IDs ohne `Secure;HttpOnly`
|
|
22
|
+
- JWT ohne Expiry-Default → permanente Tokens
|
|
23
|
+
- Login-Fehler-Messages leaken User-Existence ("user not found" vs "wrong password")
|
|
24
|
+
- Login-Endpoint ohne Rate-Limit → Brute-Force-Vektor
|
|
25
|
+
- Failed-Login-Logs enthalten Klartext-Passwort wenn falsches Logging-Level
|
|
26
|
+
|
|
27
|
+
## Compliance-Risiken
|
|
28
|
+
|
|
29
|
+
| Risiko | Norm | Severity | Fix |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| Session-Cookie ohne Secure-Flag | Art. 32 DSGVO | KRITISCH | `cookie: { secure: true, httpOnly: true, sameSite: 'lax' }` |
|
|
32
|
+
| JWT ohne Expiry | Art. 32 DSGVO | KRITISCH | `signOptions: { expiresIn: '15m' }` + Refresh |
|
|
33
|
+
| User-Enumeration via Error-Messages | DSGVO Art. 32 | HOCH | Generisches "Login-Daten ungueltig" |
|
|
34
|
+
| Klartext-Passwort in Logs | Art. 5 lit. f DSGVO | KRITISCH | Logging-Filter / Pino-Redact |
|
|
35
|
+
| Brute-Force-Schutz fehlt | Art. 32 DSGVO | HOCH | `@nestjs/throttler` + IP-Hash-Block |
|
|
36
|
+
| Login-Logs ohne Anonymisierung | Art. 5 lit. f | MITTEL | IP-Hash + Truncate UserAgent |
|
|
37
|
+
|
|
38
|
+
## Code-Pattern (sanitized)
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// File: src/auth/strategies/jwt.strategy.ts
|
|
42
|
+
import { Injectable, UnauthorizedException } from '@nestjs/common';
|
|
43
|
+
import { PassportStrategy } from '@nestjs/passport';
|
|
44
|
+
import { ExtractJwt, Strategy } from 'passport-jwt';
|
|
45
|
+
|
|
46
|
+
@Injectable()
|
|
47
|
+
export class JwtStrategy extends PassportStrategy(Strategy) {
|
|
48
|
+
constructor() {
|
|
49
|
+
super({
|
|
50
|
+
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
51
|
+
ignoreExpiration: false, // KRITISCH: niemals true
|
|
52
|
+
secretOrKey: process.env.JWT_SECRET!, // mind. 32 Bytes random
|
|
53
|
+
issuer: '<placeholder-domain>',
|
|
54
|
+
audience: '<placeholder-domain>',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async validate(payload: { sub: string; email: string; iat: number }) {
|
|
59
|
+
if (!payload.sub) throw new UnauthorizedException();
|
|
60
|
+
return { id: payload.sub, email: payload.email };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
// File: src/auth/auth.service.ts
|
|
67
|
+
import { Injectable, UnauthorizedException, Logger } from '@nestjs/common';
|
|
68
|
+
import { JwtService } from '@nestjs/jwt';
|
|
69
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
70
|
+
import { Repository } from 'typeorm';
|
|
71
|
+
import * as argon2 from 'argon2';
|
|
72
|
+
import { User } from '../users/user.entity';
|
|
73
|
+
import { LoginAttempt } from './login-attempt.entity';
|
|
74
|
+
|
|
75
|
+
@Injectable()
|
|
76
|
+
export class AuthService {
|
|
77
|
+
private readonly logger = new Logger(AuthService.name);
|
|
78
|
+
|
|
79
|
+
constructor(
|
|
80
|
+
@InjectRepository(User) private readonly users: Repository<User>,
|
|
81
|
+
@InjectRepository(LoginAttempt) private readonly attempts: Repository<LoginAttempt>,
|
|
82
|
+
private readonly jwt: JwtService,
|
|
83
|
+
) {}
|
|
84
|
+
|
|
85
|
+
async login(email: string, password: string, ipHash: string) {
|
|
86
|
+
// Generic-Error: user-enumeration verhindern
|
|
87
|
+
const user = await this.users.findOne({ where: { email } });
|
|
88
|
+
const valid = user ? await argon2.verify(user.passwordHash, password) : false;
|
|
89
|
+
|
|
90
|
+
// Audit-Log (egal ob Erfolg)
|
|
91
|
+
await this.attempts.save({
|
|
92
|
+
ipHash,
|
|
93
|
+
success: valid,
|
|
94
|
+
timestamp: new Date(),
|
|
95
|
+
// NIE: email, password
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
if (!user || !valid) {
|
|
99
|
+
// Konstante Antwortzeit (timing-attack-Schutz)
|
|
100
|
+
await this.delay(200);
|
|
101
|
+
throw new UnauthorizedException('Login-Daten ungueltig');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const token = this.jwt.sign(
|
|
105
|
+
{ sub: user.id, email: user.email },
|
|
106
|
+
{ expiresIn: '15m' },
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
const refresh = this.jwt.sign(
|
|
110
|
+
{ sub: user.id, type: 'refresh' },
|
|
111
|
+
{ expiresIn: '7d' },
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
return { token, refresh, expiresIn: 900 };
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async logout(userId: string) {
|
|
118
|
+
// Refresh-Token-Invalidation (in DB-Tabelle)
|
|
119
|
+
await this.users.update(userId, { tokenVersion: () => 'token_version + 1' });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
private delay(ms: number): Promise<void> {
|
|
123
|
+
return new Promise(r => setTimeout(r, ms));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
// File: src/auth/auth.controller.ts
|
|
130
|
+
import {
|
|
131
|
+
Body, Controller, Post, UseGuards, Req, Res, HttpCode,
|
|
132
|
+
} from '@nestjs/common';
|
|
133
|
+
import { Response, Request } from 'express';
|
|
134
|
+
import { Throttle } from '@nestjs/throttler';
|
|
135
|
+
import { IsEmail, IsString, MinLength } from 'class-validator';
|
|
136
|
+
import * as crypto from 'crypto';
|
|
137
|
+
import { AuthService } from './auth.service';
|
|
138
|
+
import { JwtAuthGuard } from './jwt-auth.guard';
|
|
139
|
+
|
|
140
|
+
class LoginDto {
|
|
141
|
+
@IsEmail() email!: string;
|
|
142
|
+
@IsString() @MinLength(8) password!: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@Controller('auth')
|
|
146
|
+
export class AuthController {
|
|
147
|
+
constructor(private readonly auth: AuthService) {}
|
|
148
|
+
|
|
149
|
+
@Post('login')
|
|
150
|
+
@HttpCode(200)
|
|
151
|
+
@Throttle({ default: { limit: 5, ttl: 60_000 } }) // 5/min pro IP
|
|
152
|
+
async login(@Body() dto: LoginDto, @Req() req: Request, @Res({ passthrough: true }) res: Response) {
|
|
153
|
+
const ip = req.headers['x-forwarded-for']?.toString().split(',')[0]?.trim()
|
|
154
|
+
?? req.socket.remoteAddress ?? '';
|
|
155
|
+
const ipHash = crypto.createHash('sha256').update(ip).digest('hex').slice(0, 16);
|
|
156
|
+
|
|
157
|
+
const { token, refresh, expiresIn } = await this.auth.login(dto.email, dto.password, ipHash);
|
|
158
|
+
|
|
159
|
+
res.cookie('refresh', refresh, {
|
|
160
|
+
httpOnly: true,
|
|
161
|
+
secure: process.env.NODE_ENV === 'production',
|
|
162
|
+
sameSite: 'lax',
|
|
163
|
+
maxAge: 7 * 24 * 60 * 60 * 1000,
|
|
164
|
+
path: '/auth/refresh',
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
return { token, expiresIn };
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@Post('logout')
|
|
171
|
+
@HttpCode(204)
|
|
172
|
+
@UseGuards(JwtAuthGuard)
|
|
173
|
+
async logout(@Req() req: any, @Res({ passthrough: true }) res: Response) {
|
|
174
|
+
await this.auth.logout(req.user.id);
|
|
175
|
+
res.clearCookie('refresh', { path: '/auth/refresh' });
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
// File: src/auth/auth.module.ts
|
|
182
|
+
import { Module } from '@nestjs/common';
|
|
183
|
+
import { JwtModule } from '@nestjs/jwt';
|
|
184
|
+
import { PassportModule } from '@nestjs/passport';
|
|
185
|
+
import { ThrottlerModule } from '@nestjs/throttler';
|
|
186
|
+
import { AuthService } from './auth.service';
|
|
187
|
+
import { AuthController } from './auth.controller';
|
|
188
|
+
import { JwtStrategy } from './strategies/jwt.strategy';
|
|
189
|
+
|
|
190
|
+
@Module({
|
|
191
|
+
imports: [
|
|
192
|
+
PassportModule,
|
|
193
|
+
JwtModule.register({
|
|
194
|
+
secret: process.env.JWT_SECRET,
|
|
195
|
+
signOptions: { expiresIn: '15m', issuer: '<placeholder-domain>' },
|
|
196
|
+
}),
|
|
197
|
+
ThrottlerModule.forRoot([{ ttl: 60_000, limit: 100 }]),
|
|
198
|
+
],
|
|
199
|
+
providers: [AuthService, JwtStrategy],
|
|
200
|
+
controllers: [AuthController],
|
|
201
|
+
})
|
|
202
|
+
export class AuthModule {}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## AVV / DPA
|
|
206
|
+
|
|
207
|
+
- Datenbank (User-Tabelle, Login-Attempts) — AVV mit EU-Region
|
|
208
|
+
- Mailer (E-Mail-Verifizierung, Password-Reset) — AVV
|
|
209
|
+
- Optional: SSO-Provider (Auth0 EU, Keycloak self-host) — AVV mit Drittland-TIA
|
|
210
|
+
|
|
211
|
+
## DSE-Wording-Vorlage
|
|
212
|
+
|
|
213
|
+
```markdown
|
|
214
|
+
### Login und Authentifizierung
|
|
215
|
+
|
|
216
|
+
Bei der Anmeldung verarbeiten wir folgende Daten:
|
|
217
|
+
|
|
218
|
+
- E-Mail-Adresse (zur Identifizierung)
|
|
219
|
+
- Passwort (gespeichert als Argon2-Hash, niemals im Klartext)
|
|
220
|
+
- Hash der IP-Adresse (zur Brute-Force-Erkennung)
|
|
221
|
+
- User-Agent (zur Erkennung verdaechtiger Aktivitaeten)
|
|
222
|
+
- Login-Zeitpunkt
|
|
223
|
+
|
|
224
|
+
**Rechtsgrundlage:** Art. 6 Abs. 1 lit. b DSGVO (Vertragserfuellung) +
|
|
225
|
+
Art. 6 Abs. 1 lit. f DSGVO (Sicherheit, berechtigtes Interesse).
|
|
226
|
+
**Speicherdauer:**
|
|
227
|
+
- User-Account: bis Loeschung durch Sie
|
|
228
|
+
- Login-Attempts (anonymisiert): 90 Tage
|
|
229
|
+
- Session-Cookies: 7 Tage (Refresh-Token), 15 Minuten (Access-Token)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Verify-Commands (Live-Probe)
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# 1. Login mit falschen Credentials = Generic Error
|
|
236
|
+
curl -X POST https://<placeholder-domain>/auth/login \
|
|
237
|
+
-H "Content-Type: application/json" \
|
|
238
|
+
-d '{"email":"nonexistent@example.com","password":"WRONG"}' -i
|
|
239
|
+
# Erwartung: 401 mit "Login-Daten ungueltig" (NICHT "User not found")
|
|
240
|
+
|
|
241
|
+
# 2. Rate-Limit nach 5 Versuchen
|
|
242
|
+
for i in {1..6}; do
|
|
243
|
+
curl -X POST https://<placeholder-domain>/auth/login \
|
|
244
|
+
-H "Content-Type: application/json" \
|
|
245
|
+
-d '{"email":"test@example.com","password":"wrong"}' -s -o /dev/null -w "%{http_code}\n"
|
|
246
|
+
done
|
|
247
|
+
# Erwartung: 401, 401, 401, 401, 401, 429
|
|
248
|
+
|
|
249
|
+
# 3. Refresh-Cookie HttpOnly + Secure
|
|
250
|
+
curl -X POST https://<placeholder-domain>/auth/login \
|
|
251
|
+
-H "Content-Type: application/json" \
|
|
252
|
+
-d '{"email":"<placeholder-user>","password":"<placeholder-password>"}' -i \
|
|
253
|
+
| grep -i "set-cookie:.*refresh"
|
|
254
|
+
# Erwartung: HttpOnly; Secure; SameSite=Lax
|
|
255
|
+
|
|
256
|
+
# 4. JWT-Expiry funktioniert
|
|
257
|
+
# Token decoden, exp-Feld pruefen → max +900 Sekunden
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Cross-References
|
|
261
|
+
|
|
262
|
+
- AEGIS-Scanner: `auth-flow-checker.ts`, `jwt-config-checker.ts`, `bcrypt-argon-checker.ts`, `rate-limit-checker.ts`
|
|
263
|
+
- Skill-Reference: `references/dsgvo.md` Art. 32 (Sicherheit)
|
|
264
|
+
- BSI-Grundschutz: ORP.4 Identitaets- und Berechtigungsmanagement
|
|
265
|
+
- Audit-Pattern: `references/audit-patterns.md` Phase 9 (Auth-Audit)
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
---
|
|
2
|
+
license: MIT (snippet)
|
|
3
|
+
provider: NestJS (Open-Source)
|
|
4
|
+
last-checked: 2026-05-05
|
|
5
|
+
purpose: NestJS Guards-Pattern fuer Consent-Validation auf Controller-Ebene.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# NestJS — Consent-Guard Pattern
|
|
9
|
+
|
|
10
|
+
## Trigger / Detection
|
|
11
|
+
|
|
12
|
+
Repo enthaelt:
|
|
13
|
+
- `@nestjs/core`, `@nestjs/common` in `package.json`
|
|
14
|
+
- `*.module.ts`, `*.controller.ts`, `*.service.ts` Dateien
|
|
15
|
+
- `@UseGuards(...)` Decorator-Verwendung
|
|
16
|
+
- Optional: `@nestjs/passport`, `@nestjs/jwt`, `cookie-parser` Middleware
|
|
17
|
+
|
|
18
|
+
## Default-Verhalten (was passiert ohne Konfiguration)
|
|
19
|
+
|
|
20
|
+
- NestJS hat keinen Default-Consent-Guard
|
|
21
|
+
- Tracker-Module global im `AppModule` registriert → laufen vor Consent
|
|
22
|
+
- `@Body()` ohne `ValidationPipe` akzeptiert beliebige Payloads
|
|
23
|
+
- Cookies-Read via `@Req()` ohne Type-Safety → silent failures
|
|
24
|
+
|
|
25
|
+
## Compliance-Risiken
|
|
26
|
+
|
|
27
|
+
| Risiko | Norm | Severity | Fix |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| Tracker-Service auto-instantiiert | § 25 TDDDG | KRITISCH | Lazy-Module nach Consent-Event |
|
|
30
|
+
| Endpoints ohne Consent-Guard | § 25 TDDDG | HOCH | `@UseGuards(ConsentGuard)` |
|
|
31
|
+
| Body unvalidated | Art. 25 DSGVO | MITTEL | Global `ValidationPipe` |
|
|
32
|
+
| Cookie-Parse-Errors verschluckt | DSGVO Art. 7 (Nachweis) | MITTEL | Custom Decorator mit Validation |
|
|
33
|
+
| Drittland-Tracker direkt eingebunden | Art. 44 DSGVO | KRITISCH | EU-Provider + AVV |
|
|
34
|
+
|
|
35
|
+
## Code-Pattern (sanitized)
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
// File: src/consent/consent.types.ts
|
|
39
|
+
export type Consent = {
|
|
40
|
+
necessary: true;
|
|
41
|
+
analytics: boolean;
|
|
42
|
+
marketing: boolean;
|
|
43
|
+
timestamp?: string;
|
|
44
|
+
version: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const DEFAULT_CONSENT: Consent = {
|
|
48
|
+
necessary: true,
|
|
49
|
+
analytics: false,
|
|
50
|
+
marketing: false,
|
|
51
|
+
version: '1.0',
|
|
52
|
+
};
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
// File: src/consent/consent.decorator.ts
|
|
57
|
+
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
|
|
58
|
+
import type { Request } from 'express';
|
|
59
|
+
import { DEFAULT_CONSENT, Consent } from './consent.types';
|
|
60
|
+
|
|
61
|
+
export const UserConsent = createParamDecorator(
|
|
62
|
+
(_data: unknown, ctx: ExecutionContext): Consent => {
|
|
63
|
+
const req = ctx.switchToHttp().getRequest<Request>();
|
|
64
|
+
const raw = req.cookies?.['cookie-consent'];
|
|
65
|
+
if (!raw) return { ...DEFAULT_CONSENT };
|
|
66
|
+
try {
|
|
67
|
+
const parsed = JSON.parse(raw);
|
|
68
|
+
return { ...DEFAULT_CONSENT, ...parsed };
|
|
69
|
+
} catch {
|
|
70
|
+
return { ...DEFAULT_CONSENT };
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// File: src/consent/consent.guard.ts
|
|
78
|
+
import { CanActivate, ExecutionContext, Injectable, SetMetadata } from '@nestjs/common';
|
|
79
|
+
import { Reflector } from '@nestjs/core';
|
|
80
|
+
import { DEFAULT_CONSENT, Consent } from './consent.types';
|
|
81
|
+
|
|
82
|
+
export const REQUIRES_CONSENT = 'requiresConsent';
|
|
83
|
+
export const RequiresConsent = (category: keyof Omit<Consent, 'necessary' | 'timestamp' | 'version'>) =>
|
|
84
|
+
SetMetadata(REQUIRES_CONSENT, category);
|
|
85
|
+
|
|
86
|
+
@Injectable()
|
|
87
|
+
export class ConsentGuard implements CanActivate {
|
|
88
|
+
constructor(private reflector: Reflector) {}
|
|
89
|
+
|
|
90
|
+
canActivate(ctx: ExecutionContext): boolean {
|
|
91
|
+
const required = this.reflector.get<keyof Consent>(REQUIRES_CONSENT, ctx.getHandler());
|
|
92
|
+
if (!required) return true;
|
|
93
|
+
|
|
94
|
+
const req = ctx.switchToHttp().getRequest();
|
|
95
|
+
const raw = req.cookies?.['cookie-consent'];
|
|
96
|
+
if (!raw) return false;
|
|
97
|
+
try {
|
|
98
|
+
const consent = { ...DEFAULT_CONSENT, ...JSON.parse(raw) };
|
|
99
|
+
return consent[required] === true;
|
|
100
|
+
} catch {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// File: src/consent/consent.controller.ts
|
|
109
|
+
import { Body, Controller, Post, Res, HttpCode, BadRequestException } from '@nestjs/common';
|
|
110
|
+
import { Response } from 'express';
|
|
111
|
+
import { IsBoolean, IsOptional } from 'class-validator';
|
|
112
|
+
import { ConsentService } from './consent.service';
|
|
113
|
+
|
|
114
|
+
class ConsentDto {
|
|
115
|
+
@IsBoolean() analytics!: boolean;
|
|
116
|
+
@IsBoolean() marketing!: boolean;
|
|
117
|
+
@IsOptional() @IsBoolean() necessary?: boolean;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@Controller('api/consent-log')
|
|
121
|
+
export class ConsentController {
|
|
122
|
+
constructor(private readonly consentService: ConsentService) {}
|
|
123
|
+
|
|
124
|
+
@Post()
|
|
125
|
+
@HttpCode(204)
|
|
126
|
+
async logConsent(@Body() dto: ConsentDto, @Res({ passthrough: true }) res: Response) {
|
|
127
|
+
const final = {
|
|
128
|
+
necessary: true as const,
|
|
129
|
+
analytics: dto.analytics,
|
|
130
|
+
marketing: dto.marketing,
|
|
131
|
+
timestamp: new Date().toISOString(),
|
|
132
|
+
version: '1.0' as const,
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
await this.consentService.logConsent(final, res.req);
|
|
136
|
+
|
|
137
|
+
res.cookie('cookie-consent', JSON.stringify(final), {
|
|
138
|
+
httpOnly: false,
|
|
139
|
+
secure: process.env.NODE_ENV === 'production',
|
|
140
|
+
sameSite: 'lax',
|
|
141
|
+
maxAge: 12 * 30 * 24 * 60 * 60 * 1000,
|
|
142
|
+
path: '/',
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
// File: src/consent/consent.service.ts
|
|
150
|
+
import { Injectable } from '@nestjs/common';
|
|
151
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
152
|
+
import { Repository } from 'typeorm';
|
|
153
|
+
import * as crypto from 'crypto';
|
|
154
|
+
import { ConsentLog } from './consent-log.entity';
|
|
155
|
+
import { Consent } from './consent.types';
|
|
156
|
+
|
|
157
|
+
@Injectable()
|
|
158
|
+
export class ConsentService {
|
|
159
|
+
constructor(
|
|
160
|
+
@InjectRepository(ConsentLog) private readonly repo: Repository<ConsentLog>,
|
|
161
|
+
) {}
|
|
162
|
+
|
|
163
|
+
async logConsent(consent: Consent, req: any): Promise<void> {
|
|
164
|
+
const ip = req.headers['x-forwarded-for']?.toString().split(',')[0]?.trim()
|
|
165
|
+
?? req.socket?.remoteAddress
|
|
166
|
+
?? '';
|
|
167
|
+
const ipHash = crypto
|
|
168
|
+
.createHash('sha256')
|
|
169
|
+
.update(ip + (process.env.IP_HASH_SALT ?? ''))
|
|
170
|
+
.digest('hex')
|
|
171
|
+
.slice(0, 16);
|
|
172
|
+
|
|
173
|
+
await this.repo.save({
|
|
174
|
+
ipHash,
|
|
175
|
+
userAgent: (req.headers['user-agent'] ?? '').slice(0, 200),
|
|
176
|
+
consent: JSON.stringify(consent),
|
|
177
|
+
timestamp: new Date(),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
// File: src/tracking/tracking.controller.ts (Beispiel-Verwendung)
|
|
185
|
+
import { Body, Controller, Post, UseGuards, HttpCode } from '@nestjs/common';
|
|
186
|
+
import { ConsentGuard, RequiresConsent } from '../consent/consent.guard';
|
|
187
|
+
|
|
188
|
+
@Controller('api/track')
|
|
189
|
+
export class TrackingController {
|
|
190
|
+
@Post()
|
|
191
|
+
@HttpCode(204)
|
|
192
|
+
@UseGuards(ConsentGuard)
|
|
193
|
+
@RequiresConsent('analytics')
|
|
194
|
+
async track(@Body() event: any) {
|
|
195
|
+
// Wird nur ausgefuehrt wenn analytics: true im Cookie
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## AVV / DPA
|
|
201
|
+
|
|
202
|
+
- Datenbank (TypeORM/Prisma → Postgres-EU) — AVV
|
|
203
|
+
- Hosting-Provider — Art. 28 DSGVO
|
|
204
|
+
- Logging-Service (sofern extern) — AVV
|
|
205
|
+
- Tracker-Forward-Provider — AVV mit EU-Hosting
|
|
206
|
+
|
|
207
|
+
## DSE-Wording-Vorlage
|
|
208
|
+
|
|
209
|
+
```markdown
|
|
210
|
+
### Consent-Logging
|
|
211
|
+
|
|
212
|
+
Wir protokollieren Ihre Cookie-Einwilligung serverseitig zur Erfuellung der
|
|
213
|
+
Nachweispflicht (Art. 7 Abs. 1 DSGVO). Protokolliert werden:
|
|
214
|
+
|
|
215
|
+
- Hash Ihrer IP-Adresse (SHA-256 mit Salt, gekuerzt)
|
|
216
|
+
- User-Agent (Browser-String, max. 200 Zeichen)
|
|
217
|
+
- Zeitstempel
|
|
218
|
+
- Gewaehlte Cookie-Kategorien
|
|
219
|
+
|
|
220
|
+
**Speicherdauer:** 6 Jahre (Verjaehrungsfrist Schadensersatz-Anspruch
|
|
221
|
+
DSGVO).
|
|
222
|
+
**Zweck:** Beweisfunktion bei Streitigkeiten ueber Einwilligung.
|
|
223
|
+
**Keine Personalisierung:** Das Log ist nicht mit Ihrem Account verknuepft.
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Verify-Commands (Live-Probe)
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# 1. Tracking-Endpoint blockt ohne Consent-Cookie
|
|
230
|
+
curl -X POST https://<placeholder-domain>/api/track \
|
|
231
|
+
-H "Content-Type: application/json" -d '{"event":"pageview"}' -i
|
|
232
|
+
# Erwartung: 403 (ConsentGuard refuses)
|
|
233
|
+
|
|
234
|
+
# 2. Mit Consent-Cookie: 204
|
|
235
|
+
curl -X POST https://<placeholder-domain>/api/track \
|
|
236
|
+
-H "Content-Type: application/json" \
|
|
237
|
+
-H 'Cookie: cookie-consent=%7B%22analytics%22%3Atrue%7D' \
|
|
238
|
+
-d '{"event":"pageview"}' -i
|
|
239
|
+
# Erwartung: 204
|
|
240
|
+
|
|
241
|
+
# 3. Consent-Log persistiert
|
|
242
|
+
# DB-Query: SELECT COUNT(*) FROM consent_log WHERE timestamp > now() - interval '1 hour';
|
|
243
|
+
|
|
244
|
+
# 4. Validation-Pipe blockt invalid Payload
|
|
245
|
+
curl -X POST https://<placeholder-domain>/api/consent-log \
|
|
246
|
+
-H "Content-Type: application/json" -d '{"analytics":"yes"}' -i
|
|
247
|
+
# Erwartung: 400 mit ValidationError
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Cross-References
|
|
251
|
+
|
|
252
|
+
- AEGIS-Scanner: `consent-flow-checker.ts`, `nestjs-guard-checker.ts`, `cookie-flags-checker.ts`
|
|
253
|
+
- Skill-Reference: `references/dsgvo.md` § 25 TDDDG, Art. 7 DSGVO
|
|
254
|
+
- BGH-Rechtsprechung: `references/bgh-urteile.md` BGH I ZR 7/16
|
|
255
|
+
- Audit-Pattern: `references/audit-patterns.md` Phase 2 (Cookie-Audit)
|