-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Executive summary and report endpoints don’t enforce investigation ownership.
The reporting endpoints:
POST /forensics/investigations/:id/generate-summaryPOST /forensics/investigations/:id/reportsGET /forensics/investigations/:id/reports
all:
- Are unauthenticated.
- Use only the path
:idto scope operations, without confirming that the investigation belongs to the caller. - For creation routes, accept
req.bodydirectly (no Zod validation), despite the presence ofinsertForensicReportSchema.
For a forensic/reporting system, these should:
- Require auth.
- Verify investigation ownership before generating/creating/fetching reports.
- Validate report creation payloads via
insertForensicReportSchemaand return 400s on invalid data.
Based on learnings, forensic reports should be both tenant‑scoped and schema‑validated for defensibility.
Originally posted by @coderabbitai[bot] in #5 (comment)
Metadata
Metadata
Assignees
Labels
No labels