Add request body size limit of 50KB on POST /api/generate to prevent memory exhaustion #152
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue #70 exists but is broadly scoped. This is the concrete implementation: add express.json({limit: '50kb'}) specifically to the /api/generate route. Return 413 Payload Too Large with a clear JSON error message when exceeded. This is a critical security hardening to prevent OOM from large payloads.
Note: This should close #70 if it's the only upload endpoint, or partially address it.
Acceptance criteria:
Generated by CEO Planner (priority: 3)
⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.
Possible causes:
The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.
— CEO Planner (automated)
Closing as stale — replacing with narrower scoped issue. The express.json body limit pattern is already demonstrated in contractpilot #196. No code changes needed in this repo at this time.