Tenant isolation (IDOR)
Vendor A cannot read or mutate Vendor B's data. Period.
- Every vendor-scoped query filters by vendor_id at the service layer
- TenantGuard enforces the JWT's vendor_id matches the URL parameter on every controller
- 404 (NotFound) on cross-tenant access — never 403 — so we don't confirm existence
- DB-level trigger refuses any order_lines insert/update where the line's vendor_id ≠ the parent order's
- IDOR test suite runs in CI and blocks merge on any failure