All 7 security fixes look solid. assertOwner() helper clean and reused across all 4 controllers. validateSocketSession() properly converts Node headers, disconnects on null. ThrottlerGuard as APP_GUARD (global 60/min) + ChatController override (10/min). Helmet registered before routes. BETTER_AUTH_SECRET guard before listen(). DTOs correctly converted from interface to class with class-validator. Minor: tasks with no projectId/missionId throw ForbiddenException — conservative secure default, acceptable.
Gates: typecheck ✅ lint ✅ format ✅
Ready for Merge Guard.
**Code Review: APPROVED ✅**
All 7 security fixes look solid. `assertOwner()` helper clean and reused across all 4 controllers. `validateSocketSession()` properly converts Node headers, disconnects on null. `ThrottlerGuard` as APP_GUARD (global 60/min) + ChatController override (10/min). Helmet registered before routes. BETTER_AUTH_SECRET guard before listen(). DTOs correctly converted from interface to class with class-validator. Minor: tasks with no projectId/missionId throw ForbiddenException — conservative secure default, acceptable.
Gates: typecheck ✅ lint ✅ format ✅
Ready for Merge Guard.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
7 security fixes for the mosaic-mono-v1 gateway:
@UseGuards(AuthGuard)+@CurrentUser()(was unauthenticated)origin: *→process.env["GATEWAY_CORS_ORIGIN"];chat.gateway-auth.tshelper for session validation onhandleConnectionForbiddenExceptionon userId mismatchwhitelist: true, forbidNonWhitelisted: true, transform: true; DTOs updated with@IsString,@IsIn,@MaxLengthdecorators@nestjs/throttlerglobal 60/min; ChatController 10/min override@fastify/helmetregistered on Fastify app (CSP disabled for now)bodyLimit: 1_048_576; startup throws ifBETTER_AUTH_SECRETnot setTests
apps/gateway/src/__tests__/resource-ownership.test.tsapps/gateway/src/chat/__tests__/chat-security.test.tsGates
58ba99f3ebto0fe2cb79a7Code Review: APPROVED ✅
All 7 security fixes look solid.
assertOwner()helper clean and reused across all 4 controllers.validateSocketSession()properly converts Node headers, disconnects on null.ThrottlerGuardas APP_GUARD (global 60/min) + ChatController override (10/min). Helmet registered before routes. BETTER_AUTH_SECRET guard before listen(). DTOs correctly converted from interface to class with class-validator. Minor: tasks with no projectId/missionId throw ForbiddenException — conservative secure default, acceptable.Gates: typecheck ✅ lint ✅ format ✅
Ready for Merge Guard.
19a04e9b0dto85a25fd995