Files
patrickandClaude Sonnet 5 ceddeb1bf4
CI / backend-tests (push) Failing after 19s
CI / frontend-build (push) Successful in 25s
Multi-Agent-Review: Race Conditions, DB-Indizes, TLS/Security-Härtung
Konsolidierte Funde aus postgres-/sql-/jwt-/owasp-top10-expert-Review:

- Race Conditions gefixt: doppelte aktive Kontrolle (SAVEPOINT + partieller
  Unique-Index), doppelte Mindermengen-Genehmigung (FOR UPDATE + Unique-Index),
  Lost-Update bei Nachfüllung (FOR UPDATE auf Fehlbestand/Objektposition).
- Migration 0007: partielle Unique-Indizes als DB-Sicherheitsnetz + fehlende
  FK-Indizes (fehlbestand.material_id, kontrolle(objekt_id,status),
  zustaendigkeit, benutzer_rolle.rolle, objektposition.ablaufdatum u.a.).
- Connection-Pool explizit begrenzt (pool_size=5, max_overflow=5) - ohne das
  könnte jeder uvicorn-Worker den Postgres max_connections-Wert sprengen.
- Timing-Angriff bei Login-Enumeration gefixt (konstante Antwortzeit über
  Dummy-Hash), JWT-Decode verlangt jetzt exp/sub-Claims.
- App-seitiges Rate-Limiting (slowapi, 5/min) auf /auth/login als Verteidigung
  in der Tiefe zusätzlich zum nginx-Limit.
- nginx: TLS mit selbstsigniertem Zertifikat (LAN-Betrieb, keine Domain),
  HSTS, Content-Security-Policy, Permissions-Policy ergänzt.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVgbozhYmuEhiEJHffRXCV
2026-09-04 18:47:06 +02:00

40 lines
1.2 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[project]
name = "mabea-backend"
version = "0.1.0"
description = "MABEA Digitales Materialmanagement Rettungsdienst/KatS, Backend (Sprint 0)"
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.115,<0.116",
"uvicorn[standard]>=0.32,<0.33",
"sqlalchemy>=2.0,<2.1",
"asyncpg>=0.30,<0.31",
"alembic>=1.13,<1.14",
"pydantic-settings>=2.6,<2.7",
"passlib[bcrypt]>=1.7,<1.8",
# passlib 1.7.4 liest bcrypt.__about__.__version__, das ab bcrypt 4.1 entfernt wurde
# (Fund im ersten echten CI-Lauf: "password cannot be longer than 72 bytes" ist eine
# irreführende Folgefehlermeldung, echte Ursache ist die AttributeError beim Backend-Check).
"bcrypt>=4.0,<4.1",
"pyjwt>=2.9,<2.10",
"python-multipart>=0.0.12,<0.1",
"aiosmtplib>=3.0,<3.1",
"python-barcode[images]>=0.15,<0.16",
"reportlab>=4.2,<4.3",
"slowapi>=0.1.9,<0.2",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3,<8.4",
"pytest-asyncio>=0.24,<0.25",
"pytest-cov>=5.0,<6.0",
"httpx>=0.27,<0.28",
]
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["app*"]