docs: 200 Architektur-Fehler (ARCH-001 bis ARCH-200) durch systematisches Code-Review dokumentiert
This commit is contained in:
@@ -1952,3 +1952,63 @@ Playwright E2E: 10 passed, 24 failed (BUG-011/012/013 — Mock-Daten und data-te
|
|||||||
- **Problem:** Mehrere Routes verwenden falsche Permissions die nicht zu ihrem Modul passen. Permission-Namen sind inkonsistent und zugeordnet zu falschen Modulen.
|
- **Problem:** Mehrere Routes verwenden falsche Permissions die nicht zu ihrem Modul passen. Permission-Namen sind inkonsistent und zugeordnet zu falschen Modulen.
|
||||||
- **Schweregrad:** High
|
- **Schweregrad:** High
|
||||||
- **Status:** ⏳ Nicht gefixt
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-191: models/compliance.py — ComplianceIncident ohne OwnedMixin
|
||||||
|
- **Datei:** app/models/compliance.py:18
|
||||||
|
- **Problem:** ComplianceIncident hat kein OwnedMixin. Kein owner_id, keine Visibility-Filterung. Jeder User kann alle Incidents sehen.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-192: models/outbox.py — EventOutbox hat tenant_id aber kein TenantMixin
|
||||||
|
- **Datei:** app/models/outbox.py:20
|
||||||
|
- **Problem:** EventOutbox hat `tenant_id: Mapped[uuid.UUID]` aber erbt nicht von TenantMixin. Inkonsistent mit anderen Models.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-193: models/entity_policy.py — ABAC EntityPolicy nicht aktiv genutzt (toter Code)
|
||||||
|
- **Datei:** app/models/entity_policy.py:7
|
||||||
|
- **Problem:** Kommentar: 'ABAC EntityPolicy ist implementiert aber wird nicht aktiv genutzt'. Toter Code der verwirrt.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-194: models/address.py — bekannte Inkonsistenz (inline vs Tabelle)
|
||||||
|
- **Datei:** app/models/address.py:5
|
||||||
|
- **Problem:** Kommentar: 'Address-Tabelle wird für Bank-Accounts genutzt. Contacts nutzen inline Address-Felder. Diese Inkonsistenz ist bekannt'. Bekanntes Architektur-Problem.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-195: models/bank_account.py — IBAN als Plaintext
|
||||||
|
- **Datei:** app/models/bank_account.py:25
|
||||||
|
- **Problem:** `iban: Mapped[str] = mapped_column(String(34), nullable=False)` — IBAN als Plaintext in DB. Sollte verschlüsselt sein.
|
||||||
|
- **Schweregrad:** High
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-196: models/system_settings.py — Sensitive Daten als Plaintext
|
||||||
|
- **Datei:** app/models/system_settings.py:35-37
|
||||||
|
- **Problem:** tax_number, iban, bic als Plaintext in DB. Sensitive Finanzdaten unverschlüsselt.
|
||||||
|
- **Schweregrad:** High
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-197: models/tenant.py — resolution_strategy hardcoded
|
||||||
|
- **Datei:** app/models/tenant.py:25
|
||||||
|
- **Problem:** `CheckConstraint("resolution_strategy IN ('highest_wins')")` — hardcoded. Nur eine Strategie erlaubt.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-198: models/workflow.py — steps als JSONB ohne Validierung
|
||||||
|
- **Datei:** app/models/workflow.py:30
|
||||||
|
- **Problem:** `steps: Mapped[list[dict[str, Any]]] = mapped_column(JSONB, nullable=False)` — keine Validierung der Step-Struktur. Jedes JSON wird akzeptiert.
|
||||||
|
- **Schweregrad:** Medium
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-199: models/contact_merge.py — inkonsistente ondelete policies
|
||||||
|
- **Datei:** app/models/contact_merge.py:25-28
|
||||||
|
- **Problem:** source_contact_id hat ondelete='SET NULL', target_contact_id hat ondelete='CASCADE'. Inkonsistent — wenn Target gelöscht wird, wird Merge-History gelöscht. Wenn Source gelöscht wird, bleibt History mit NULL.
|
||||||
|
- **Schweregrad:** Low
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|
||||||
|
### ARCH-200: Systematisches Problem — Sensitive Daten als Plaintext in DB
|
||||||
|
- **Dateien:** models/bank_account.py (iban), models/system_settings.py (tax_number, iban, bic), ai_assistant/models.py (api_key), mail/models.py (encrypted_password — OK), models/webhook.py (secret)
|
||||||
|
- **Problem:** Mehrere Models speichern sensitive Daten als Plaintext. Nur mail/models.py verschlüsselt passwords. Andere sensitive Felder (IBAN, API-Keys, Webhook-Secrets, Tax-Numbers) sind unverschlüsselt.
|
||||||
|
- **Schweregrad:** High
|
||||||
|
- **Status:** ⏳ Nicht gefixt
|
||||||
|
|||||||
Reference in New Issue
Block a user