Repository navigation
Conversation
Add a 10MB maximum buffer size limit to the WebSocket parser in skills/brainstorming/scripts/server.js. Placed after extracting valid frames to avoid falsely rejecting multi-frame chunks. Also added an entry to the Sentinel journal about the finding. Co-authored-by: pakorn269 <[email protected]>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Closing β conflicts due to |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
Security: add 10MB MAX_BUFFER_SIZE cap on WebSocket buffer to prevent memory exhaustion DoS (closes duplicate PRs #24 #28 #32 #33 #37 #41 #44). Performance: replace String.prototype.replace() with lastIndexOf+slice in both wrapInFrame and handleRequest for multi-megabyte HTML payloads (closes duplicate PRs #19 #22 #26 #29 #30 #35 #38 #39 #42). Update .jules/sentinel.md and .jules/bolt.md with learnings. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
π¨ Severity: CRITICAL
π‘ Vulnerability: The custom WebSocket parser in
skills/brainstorming/scripts/server.jswas missing an explicit maximum buffer size limit. It would continuously append incoming chunks to a memory buffer. A malicious client could connect to the server and stream partial frames (or data without frame headers) infinitely.π― Impact: If exploited, a single malicious client could exhaust server memory, leading to an out-of-memory crash (Denial of Service - DoS), taking down the brainstorm server.
π§ Fix: Added a 10MB (
10 * 1024 * 1024) maximum limit onbuffer.length. Following project guidelines, this check is placed after the innerwhileloop that processes valid frames to avoid falsely triggering the limit on legitimate clients sending multi-frame payloads.β Verification: Ran
cd tests/brainstorm-server && pnpm test(passing 27 integration tests, 32 websocket protocol unit tests, and 9 helper function tests). Checked the code changes to ensure the buffer length is explicitly bounded, and confirmed the connection closes securely (OPCODES.CLOSE, status1009) when the limit is breached. Added journal entry to.jules/sentinel.md.PR created automatically by Jules for task 1118543185225481049 started by @pakorn269