andrewmusselman opened a new issue, #552:
URL: https://github.com/apache/tooling-trusted-releases/issues/552

   ## Summary
   
   Email thread processing iterates through all messages without limit, 
potentially exhausting resources on long threads.
   
   ## ASVS Requirements
   
   - 1.5.1 - Resource consumption controls
   
   ## Related Audit Reports
   
   - [Denial of Service #407](ASVS/denial-of-service-407.md) - Issue 4
   
   ## Affected Files
   
   - `atr/tabulate.py:41, 99`
   
   ## Current Behavior
   
   ```python
   async for _mid, msg in util.thread_messages(thread_id):
       # No limit on iterations
   ```
   
   ## Recommended Fix
   
   ```python
   MAX_THREAD_MESSAGES = 10000
   
   message_count = 0
   async for _mid, msg in util.thread_messages(thread_id):
       message_count += 1
       if message_count > MAX_THREAD_MESSAGES:
           raise ValueError(f"Thread exceeds maximum of {MAX_THREAD_MESSAGES} 
messages")
   ```
   
   ## Acceptance Criteria
   
   - [ ] Maximum message count enforced
   - [ ] Appropriate error message returned
   - [ ] Consider pagination for large threads


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to