diff --git a/backend-compliance/compliance/api/agent_doc_check_routes.py b/backend-compliance/compliance/api/agent_doc_check_routes.py index 47cccee..4a06aeb 100644 --- a/backend-compliance/compliance/api/agent_doc_check_routes.py +++ b/backend-compliance/compliance/api/agent_doc_check_routes.py @@ -259,12 +259,13 @@ def _run_checklist(text: str, doc_type: str, label: str, url: str, word_count: i # Everything else (Social Media, Betroffenenrechte, Dienste von Drittanbietern) # is part of the parent DSI and inherits its checks. SECTION_TYPE_MAP = [ - (r"^cookie", "cookie"), # Cookie-Richtlinie → §25 TDDDG - (r"widerrufsrecht|widerrufsbelehrung", "widerruf"), # Widerruf → §355 BGB - (r"^impressum$", "impressum"), # Impressum → §5 TMG + (r"^cookie", "cookie"), + (r"widerrufsrecht|widerrufsbelehrung", "widerruf"), + (r"^impressum$", "impressum"), (r"^(?:agb|allgemeine geschäftsbedingungen|nutzungsbedingungen)$", "agb"), - (r"datenschutzerkl.*social|datenschutz.*social\s*media", "social_media"), - (r"datenschutzfolge|dsfa|risikoanalyse.*social", "dsfa"), + # DSFA MUST be checked BEFORE social_media (both can contain "Social Media") + (r"datenschutzfolge|dsfa|risikoanalyse|risikobew(?:ae|ä)gung", "dsfa"), + (r"datenschutzerkl(?:ae|ä)rung.*social|datenschutz\s+f(?:ue|ü)r\s+social", "social_media"), ]