d9c16fb914
Block C implementation: - adversarial_cases.yaml: 30 tricky cases in 5 categories (wrong legal basis, dark patterns, incomplete docs, similar-but-different, homonyms) - test_adversarial.py: 63 tests validating adversarial cases - test_regression.py: ontology stability, dependency engine, quality metrics - conftest.py: shared fixtures (DB session, sample controls) Total: 371 tests passing (221 existing + 150 new). Real-world benchmarks (C1) need manual ground truth creation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
319 lines
12 KiB
YAML
319 lines
12 KiB
YAML
# Adversarial Test Suite — 30 tricky Cases die Controls/Agent herausfordern
|
|
version: "1.0"
|
|
purpose: "Testen ob Controls und Agent bei grenzwertigen Formulierungen korrekt entscheiden"
|
|
|
|
tests:
|
|
|
|
# A. Falsche Rechtsgrundlage (plausibel klingend) — 8 Cases
|
|
|
|
- id: ADV-LIT-001
|
|
category: wrong_legal_basis
|
|
input: "Wir verarbeiten Ihre Daten fuer Webanalyse auf Grundlage unseres berechtigten Interesses (Art. 6 Abs. 1 lit. f DSGVO)."
|
|
context: "DSE-Abschnitt ueber Google Analytics"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Art. 6 Abs. 1 lit. a (Einwilligung)"
|
|
reason: "Analytics erfordert Einwilligung, nicht berechtigtes Interesse (EuGH C-673/17 Planet49)"
|
|
difficulty: medium
|
|
|
|
- id: ADV-LIT-002
|
|
category: wrong_legal_basis
|
|
input: "Der Versand unseres Newsletters erfolgt auf Grundlage des Vertrages (Art. 6 Abs. 1 lit. b DSGVO)."
|
|
context: "DSE-Abschnitt ueber Marketing"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Art. 6 Abs. 1 lit. a (Einwilligung)"
|
|
reason: "Newsletter ist kein Vertragsbestandteil, erfordert separate Einwilligung"
|
|
difficulty: medium
|
|
|
|
- id: ADV-LIT-003
|
|
category: wrong_legal_basis
|
|
input: "Die Ueberwachung der Arbeitsleistung unserer Mitarbeiter erfolgt auf Grundlage unseres berechtigten Interesses."
|
|
context: "Interne Datenschutzrichtlinie"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Betriebsvereinbarung + Art. 88 DSGVO i.V.m. § 26 BDSG"
|
|
reason: "Mitarbeiterueberwachung erfordert Betriebsvereinbarung (BAG Keylogger-Urteil)"
|
|
difficulty: hard
|
|
|
|
- id: ADV-LIT-004
|
|
category: wrong_legal_basis
|
|
input: "Biometrische Zutrittskontrolle auf Basis von Art. 6 Abs. 1 lit. f DSGVO."
|
|
context: "Sicherheitskonzept"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Art. 9 Abs. 2 DSGVO (ausdrueckliche Einwilligung oder Arbeitsrecht)"
|
|
reason: "Biometrische Daten = besondere Kategorie nach Art. 9, lit. f reicht nicht"
|
|
difficulty: hard
|
|
|
|
- id: ADV-LIT-005
|
|
category: wrong_legal_basis
|
|
input: "Wir erstellen automatisierte Kreditentscheidungen auf Grundlage berechtigter Interessen."
|
|
context: "DSE einer Bank"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Art. 22 DSGVO (ausdrueckliche Einwilligung oder gesetzliche Erlaubnis)"
|
|
reason: "Automatisierte Einzelentscheidungen erfordern Art. 22 Schutz (EuGH SCHUFA C-634/21)"
|
|
difficulty: hard
|
|
|
|
- id: ADV-LIT-006
|
|
category: wrong_legal_basis
|
|
input: "Social Login ueber Google wird als Vertragsdurchfuehrung (lit. b) verarbeitet."
|
|
context: "DSE mit Social Login"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Art. 6 Abs. 1 lit. a (Einwilligung)"
|
|
reason: "Social Login ist keine Vertragspflicht, Nutzer kann sich auch ohne Google anmelden"
|
|
difficulty: medium
|
|
|
|
- id: ADV-LIT-007
|
|
category: wrong_legal_basis
|
|
input: "Personalisierte Werbung basiert auf unserem berechtigten Interesse an Direktmarketing."
|
|
context: "DSE eines marktbeherrschenden Unternehmens"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Art. 6 Abs. 1 lit. a (Einwilligung)"
|
|
reason: "Marktbeherrschende Unternehmen koennen sich nicht auf lit. f fuer Werbung berufen (EuGH Meta C-252/21)"
|
|
difficulty: hard
|
|
|
|
- id: ADV-LIT-008
|
|
category: wrong_legal_basis
|
|
input: "Die Einbindung von Facebook Pixel erfolgt zur Vertragserfuellung (Art. 6 Abs. 1 lit. b DSGVO)."
|
|
context: "DSE eines Online-Shops"
|
|
expected:
|
|
finding: true
|
|
finding_type: wrong_legal_basis
|
|
correct_basis: "Art. 6 Abs. 1 lit. a (Einwilligung)"
|
|
reason: "Facebook Pixel dient Tracking/Marketing, nicht der Vertragserfuellung"
|
|
difficulty: easy
|
|
|
|
# B. Dark Patterns (subtil) — 6 Cases
|
|
|
|
- id: ADV-DP-001
|
|
category: dark_pattern
|
|
input:
|
|
accept_button: {text: "Alle akzeptieren", size: "16px", color: "#ffffff", background: "#0066cc", prominent: true}
|
|
reject_button: {text: "Ablehnen", size: "10px", color: "#cccccc", background: "transparent", prominent: false}
|
|
expected:
|
|
finding: true
|
|
finding_type: dark_pattern_visual_bias
|
|
reason: "Ablehnen-Button ist kleiner, weniger sichtbar (OLG Koeln 6 U 58/21)"
|
|
difficulty: easy
|
|
|
|
- id: ADV-DP-002
|
|
category: dark_pattern
|
|
input:
|
|
accept_button: {text: "Alle akzeptieren", clicks_to_complete: 1}
|
|
reject_option: {text: "Einstellungen verwalten", clicks_to_complete: 3, label: "Einstellungen"}
|
|
expected:
|
|
finding: true
|
|
finding_type: dark_pattern_friction_asymmetry
|
|
reason: "Ablehnen erfordert 3 Klicks, Akzeptieren nur 1 (CNIL Cookie-Banner)"
|
|
difficulty: medium
|
|
|
|
- id: ADV-DP-003
|
|
category: dark_pattern
|
|
input:
|
|
type: "cookie_wall"
|
|
description: "Inhalt erst nach Cookie-Zustimmung sichtbar"
|
|
expected:
|
|
finding: true
|
|
finding_type: dark_pattern_cookie_wall
|
|
reason: "Cookie-Wall = keine freiwillige Einwilligung (EDPB Guidelines 05/2020)"
|
|
difficulty: medium
|
|
|
|
- id: ADV-DP-004
|
|
category: dark_pattern
|
|
input:
|
|
type: "prechecked_boxes"
|
|
description: "Checkboxen fuer Marketing und Analytics sind vorausgefuellt"
|
|
expected:
|
|
finding: true
|
|
finding_type: dark_pattern_prechecked
|
|
reason: "Vorausgefuellte Checkboxen sind keine wirksame Einwilligung (BGH Planet49)"
|
|
difficulty: easy
|
|
|
|
- id: ADV-DP-005
|
|
category: dark_pattern
|
|
input:
|
|
type: "confirm_shaming"
|
|
accept_text: "Ja, ich moechte sicher surfen"
|
|
reject_text: "Nein, ich verzichte auf Sicherheit"
|
|
expected:
|
|
finding: true
|
|
finding_type: dark_pattern_confirm_shaming
|
|
reason: "Manipulative Formulierung beeinflusst Entscheidung"
|
|
difficulty: medium
|
|
|
|
- id: ADV-DP-006
|
|
category: dark_pattern
|
|
input:
|
|
type: "hidden_reject"
|
|
description: "Ablehnen-Link ist 3px gross, Farbe #f0f0f0 auf weissem Hintergrund"
|
|
expected:
|
|
finding: true
|
|
finding_type: dark_pattern_hidden_option
|
|
reason: "Ablehnen-Option praktisch unsichtbar (OLG Koeln)"
|
|
difficulty: easy
|
|
|
|
# C. Fast-vollstaendige Dokumente — 6 Cases
|
|
|
|
- id: ADV-DOC-001
|
|
category: incomplete_document
|
|
input: "Impressum: Max Mustermann GmbH, Musterstr. 1, 10115 Berlin, info@example.com, HRB 12345"
|
|
expected:
|
|
finding: true
|
|
finding_type: missing_field
|
|
missing: "USt-ID"
|
|
reason: "§ 5 Abs. 1 Nr. 6 DDG: USt-IdNr. oder Wirtschafts-ID Pflicht"
|
|
difficulty: easy
|
|
|
|
- id: ADV-DOC-002
|
|
category: incomplete_document
|
|
input: "Datenschutzerklaerung mit Zwecken, Rechtsgrundlagen, Empfaengern, Betroffenenrechten — aber ohne Speicherdauer"
|
|
expected:
|
|
finding: true
|
|
finding_type: missing_field
|
|
missing: "Speicherdauer"
|
|
reason: "Art. 13 Abs. 2 lit. a DSGVO: Dauer der Speicherung oder Kriterien"
|
|
difficulty: medium
|
|
|
|
- id: ADV-DOC-003
|
|
category: incomplete_document
|
|
input: "DSE ohne Kontaktdaten des Datenschutzbeauftragten"
|
|
expected:
|
|
finding: true
|
|
finding_type: missing_field
|
|
missing: "DSB-Kontakt"
|
|
reason: "Art. 13 Abs. 1 lit. b DSGVO: Kontaktdaten des DSB"
|
|
difficulty: easy
|
|
|
|
- id: ADV-DOC-004
|
|
category: incomplete_document
|
|
input: "Widerrufsbelehrung mit 14-Tage-Frist, Muster-Formular, aber Fristbeginn fehlt"
|
|
expected:
|
|
finding: true
|
|
finding_type: missing_field
|
|
missing: "Fristbeginn"
|
|
reason: "Anlage 1 zu Art. 246a § 1 EGBGB: Fristbeginn muss angegeben werden"
|
|
difficulty: medium
|
|
|
|
- id: ADV-DOC-005
|
|
category: incomplete_document
|
|
input: "AGB eines Online-Shops ohne Angabe des Gerichtsstands"
|
|
expected:
|
|
finding: false
|
|
reason: "Gerichtsstand in AGB ist bei B2C nicht erforderlich (sogar oft unzulaessig)"
|
|
difficulty: hard
|
|
|
|
- id: ADV-DOC-006
|
|
category: incomplete_document
|
|
input: "Cookie-Policy listet Google Analytics und Facebook Pixel auf, aber nicht das CMP-Cookie selbst"
|
|
expected:
|
|
finding: true
|
|
finding_type: missing_field
|
|
missing: "CMP-eigene Cookies"
|
|
reason: "Auch technisch notwendige Cookies muessen in der Cookie-Policy stehen"
|
|
difficulty: hard
|
|
|
|
# D. Semantisch aehnlich aber verschieden — 5 Cases
|
|
|
|
- id: ADV-SEM-001
|
|
category: similar_but_different
|
|
control_a: "MFA fuer privilegierte Admin-Accounts aktivieren"
|
|
control_b: "MFA fuer alle Endnutzer-Accounts aktivieren"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Scopes (Admin vs. Endnutzer) = verschiedene Controls"
|
|
difficulty: medium
|
|
|
|
- id: ADV-SEM-002
|
|
category: similar_but_different
|
|
control_a: "Daten nach Vertragsende loeschen"
|
|
control_b: "Daten nach Ablauf der gesetzlichen Aufbewahrungsfrist loeschen"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Trigger (Vertragsende vs. Aufbewahrungsfrist)"
|
|
difficulty: hard
|
|
|
|
- id: ADV-SEM-003
|
|
category: similar_but_different
|
|
control_a: "Rate Limiting fuer oeffentliche API-Endpunkte"
|
|
control_b: "Rate Limiting fuer Login-Endpunkte"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Asset-Scopes (API vs. Login)"
|
|
difficulty: medium
|
|
|
|
- id: ADV-SEM-004
|
|
category: similar_but_different
|
|
control_a: "Verschluesselung personenbezogener Daten at rest"
|
|
control_b: "Verschluesselung personenbezogener Daten in transit"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Phasen (Speicherung vs. Uebertragung)"
|
|
difficulty: easy
|
|
|
|
- id: ADV-SEM-005
|
|
category: similar_but_different
|
|
control_a: "Incident Response Plan erstellen"
|
|
control_b: "Business Continuity Plan erstellen"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "IRP = Sicherheitsvorfaelle, BCP = Geschaeftskontinuitaet (verschiedene Ziele)"
|
|
difficulty: medium
|
|
|
|
# E. Semantisch verschieden aber gleich klingend — 5 Cases
|
|
|
|
- id: ADV-HOM-001
|
|
category: homonym_different
|
|
control_a: "Einwilligung des Nutzers fuer Datenverarbeitung einholen (DSGVO)"
|
|
control_b: "Einwilligung des Nutzers fuer Werbeanrufe einholen (UWG)"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Rechtsgrundlagen (DSGVO vs. UWG) und verschiedene Rechtsfolgen"
|
|
difficulty: hard
|
|
|
|
- id: ADV-HOM-002
|
|
category: homonym_different
|
|
control_a: "Risikobewertung fuer Datenschutz-Folgenabschaetzung (DSFA)"
|
|
control_b: "Risikobewertung fuer finanzielle Risiken (MaRisk)"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Risikokategorien und verschiedene regulatorische Grundlagen"
|
|
difficulty: hard
|
|
|
|
- id: ADV-HOM-003
|
|
category: homonym_different
|
|
control_a: "Audit der Datenschutz-Compliance (Art. 5 Abs. 2 DSGVO)"
|
|
control_b: "Audit der Jahresabschlusspruefung (HGB)"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Audit-Typen mit verschiedenen Pruefungsstandards"
|
|
difficulty: medium
|
|
|
|
- id: ADV-HOM-004
|
|
category: homonym_different
|
|
control_a: "Zertifizierung nach ISO 27001 (Informationssicherheit)"
|
|
control_b: "Zertifizierung nach CE-Konformitaet (Produktsicherheit)"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Verschiedene Zertifizierungsrahmen, verschiedene Pruefer, verschiedene Ziele"
|
|
difficulty: easy
|
|
|
|
- id: ADV-HOM-005
|
|
category: homonym_different
|
|
control_a: "Verarbeitung personenbezogener Daten dokumentieren (DSGVO VVT)"
|
|
control_b: "Verarbeitung von Lebensmitteln dokumentieren (HACCP)"
|
|
expected:
|
|
is_duplicate: false
|
|
reason: "Komplett verschiedene Domaenen trotz gleicher Woerter"
|
|
difficulty: easy
|