feat: DSFA Section 8 KI-Anwendungsfälle + Bundesland RAG-Ingest
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 38s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 24s
CI / test-python-dsms-gateway (push) Successful in 19s
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 38s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 24s
CI / test-python-dsms-gateway (push) Successful in 19s
- Migration 028: ai_use_case_modules JSONB + section_8_complete auf compliance_dsfas - Neues ai-use-case-types.ts: AIUseCaseModule Interface, 8 Typen, Art22Assessment, AI Act Risikoklassen, WP248-Kriterien, Privacy by Design, createEmptyModule() Helper - types.ts: Section 8 in DSFA_SECTIONS, ai_use_case_modules im DSFA Interface, section_8_complete in DSFASectionProgress - api.ts: addAIUseCaseModule, updateAIUseCaseModule, removeAIUseCaseModule - 5 neue UI-Komponenten: AIUseCaseTypeSelector, Art22AssessmentPanel, AIRiskCriteriaChecklist, AIUseCaseModuleEditor (7 Tabs), AIUseCaseSection - DSFASidebar: Section 8 Eintrag + calculateSectionProgress case 8 - ReviewScheduleSection: ai_use_case_module Trigger-Typ ergänzt - page.tsx: Section 8 Rendering + Weiter-Button auf activeSection < 8 + KI-Module Counter - scripts/ingest-dsfa-bundesland.sh: WP248 + alle 17 Behörden → bp_dsfa_corpus - Docs: dsfa.md Section 8 + RAG-Corpus, Developer Portal DSFA mit AI-Modul-Code-Beispielen Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -260,3 +260,146 @@ graph LR
|
||||
DSFA --> Audit["Audit Checklist"]
|
||||
DSFA --> Obligation["Obligations"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Section 8: KI-Anwendungsfälle
|
||||
|
||||
Section 8 ist ein optionaler modularer Anhang zur DSFA für KI-spezifische Verarbeitungen.
|
||||
Jedes KI-System erhält ein eigenes Modul mit 7 Tabs.
|
||||
|
||||
### KI-Modul-Typen
|
||||
|
||||
| Typ | Icon | Typische Risiken |
|
||||
|-----|------|-----------------|
|
||||
| `chatbot_nlp` | 💬 | Datenpersistenz, Fehlinformation |
|
||||
| `recommendation` | 🎯 | Profiling, Verhaltensmanipulation |
|
||||
| `adm_scoring` | ⚖️ | Art. 22 DSGVO, Diskriminierung |
|
||||
| `video_image` | 📹 | Systematische Überwachung |
|
||||
| `biometrics` | 👁️ | Art. 9 DSGVO, Unwiderruflichkeit |
|
||||
| `iot_sensors` | 📡 | Lückenlose Überwachung |
|
||||
| `generative_ai` | 🤖 | Halluzinationen, Datenleckage |
|
||||
| `custom` | ⚙️ | Variabel |
|
||||
|
||||
### Art. 22 DSGVO Assessment
|
||||
|
||||
Für ADM/Scoring-Module wird automatisch ein Art.-22-Panel eingeblendet:
|
||||
- Toggle: Automatisierte Entscheidung mit Rechtswirkung?
|
||||
- Ausnahmetatbestand (Art. 22 Abs. 2 lit. a/b/c)
|
||||
- Schutzmaßnahmen-Checklist (Menschliche Überprüfung Pflicht!)
|
||||
|
||||
### AI Act Risikoklassen
|
||||
|
||||
| Klasse | Label | Anforderungen |
|
||||
|--------|-------|---------------|
|
||||
| `unacceptable` | Unannehmbares Risiko | VERBOTEN |
|
||||
| `high_risk` | Hochrisiko | Art. 9-15 AI Act |
|
||||
| `limited` | Begrenztes Risiko | Transparenz Art. 52 AI Act |
|
||||
| `minimal` | Minimales Risiko | Keine spezifischen AI-Act-Anforderungen |
|
||||
|
||||
### `ai_use_case_modules` JSONB-Schema
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "uuid",
|
||||
"use_case_type": "generative_ai",
|
||||
"name": "GPT-Assistent Kundenservice",
|
||||
"model_description": "LLM-basierter Chatbot mit RAG...",
|
||||
"model_type": "GPT-4o",
|
||||
"provider": "OpenAI",
|
||||
"third_country_transfer": true,
|
||||
"provider_country": "USA",
|
||||
"input_data_categories": ["Anfragetexte", "Kundennummer"],
|
||||
"output_data_categories": ["Antworttext", "Intent-Klassifikation"],
|
||||
"involves_special_categories": false,
|
||||
"data_subjects": ["Kunden", "Interessenten"],
|
||||
"processing_purpose": "Automatisierte Beantwortung von Kundenanfragen",
|
||||
"legal_basis": "Art. 6 Abs. 1 lit. b DSGVO (Vertragserfüllung)",
|
||||
"art22_assessment": {
|
||||
"applies": false,
|
||||
"safeguards": []
|
||||
},
|
||||
"risk_criteria": [
|
||||
{ "id": "adm_profiling", "applies": false, "severity": "high" },
|
||||
{ "id": "systematic_monitoring", "applies": false, "severity": "high" }
|
||||
],
|
||||
"ai_act_risk_class": "limited",
|
||||
"ai_act_justification": "Chatbot mit Transparenzpflicht nach Art. 52 AI Act",
|
||||
"risks": [],
|
||||
"mitigations": [],
|
||||
"privacy_by_design_measures": [
|
||||
{ "category": "data_minimisation", "description": "Nur notwendige Daten", "implemented": true }
|
||||
],
|
||||
"review_triggers": [
|
||||
{ "type": "model_update", "description": "Modell-Update", "monitoring_interval": "monatlich" }
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Migration
|
||||
|
||||
```bash
|
||||
# Migration 028 ausführen (auf Mac Mini)
|
||||
ssh macmini "/usr/local/bin/docker exec bp-compliance-backend python3 -c \"
|
||||
import sys; sys.path.insert(0, '/app')
|
||||
from compliance.database import engine
|
||||
from sqlalchemy import text
|
||||
sql = '''
|
||||
ALTER TABLE compliance.compliance_dsfas
|
||||
ADD COLUMN IF NOT EXISTS ai_use_case_modules JSONB DEFAULT '[]'::jsonb,
|
||||
ADD COLUMN IF NOT EXISTS section_8_complete BOOLEAN DEFAULT FALSE;
|
||||
'''
|
||||
with engine.connect() as conn:
|
||||
conn.execute(text(sql))
|
||||
conn.commit()
|
||||
print('Migration 028 OK')
|
||||
\""
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## RAG-Corpus bp_dsfa_corpus
|
||||
|
||||
DSFA-spezifische Rechtsdokumente sind im Corpus `bp_dsfa_corpus` indexiert.
|
||||
|
||||
### Ingest-Script
|
||||
|
||||
```bash
|
||||
# Auf Mac Mini ausführen
|
||||
ssh macmini "~/Projekte/breakpilot-compliance/scripts/ingest-dsfa-bundesland.sh"
|
||||
|
||||
# Nur Text-Dokumente (ohne Download)
|
||||
ssh macmini "~/Projekte/breakpilot-compliance/scripts/ingest-dsfa-bundesland.sh --only-text"
|
||||
```
|
||||
|
||||
### Bundesland-Behörden (16 Bundesländer + BfDI)
|
||||
|
||||
| ID | Bundesland | Behörde |
|
||||
|----|-----------|---------|
|
||||
| `bfdi` | Bund | Bundesbeauftragte für den Datenschutz (BfDI) |
|
||||
| `bw` | Baden-Württemberg | LfDI BW |
|
||||
| `by` | Bayern | LDA Bayern |
|
||||
| `be` | Berlin | BlnBDI |
|
||||
| `bb` | Brandenburg | LDA Brandenburg |
|
||||
| `hb` | Bremen | LfDI Bremen |
|
||||
| `hh` | Hamburg | HmbBfDI |
|
||||
| `he` | Hessen | HBDI |
|
||||
| `mv` | Mecklenburg-Vorpommern | LfDI MV |
|
||||
| `ni` | Niedersachsen | LfD Niedersachsen |
|
||||
| `nw` | Nordrhein-Westfalen | LDI NRW |
|
||||
| `rp` | Rheinland-Pfalz | LfDI RLP |
|
||||
| `sl` | Saarland | UfD Saarland |
|
||||
| `sn` | Sachsen | SDTB |
|
||||
| `st` | Sachsen-Anhalt | LfD Sachsen-Anhalt |
|
||||
| `sh` | Schleswig-Holstein | ULD |
|
||||
| `th` | Thüringen | TLfDI |
|
||||
|
||||
### Suche im Corpus
|
||||
|
||||
```bash
|
||||
curl -sk -X POST 'https://localhost:8097/api/v1/search' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"query":"DSFA Muss-Liste NRW","collection":"bp_dsfa_corpus","limit":5}'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user