Found during deep review of server/webhook handling
1. No authorization on issue_comment commands (MEDIUM)
The `issue_comment` webhook handler processes `@diffscope review` from any commenter. On public repositories, any GitHub user can comment on PRs. An attacker can trigger full reviews on public repos, consuming LLM API credits at will.
Fix: Check that the commenter has write access to the repo before processing commands.
2. Review sessions unbounded in memory (MEDIUM)
`ReviewSession` stores full diff content as `Some(diff_content.clone())` in the in-memory `reviews` HashMap. Large PRs (dependency updates) can be many MB. Concurrent webhooks could exhaust server memory.
Fix: Stream diffs or limit stored size. Add session count cap with LRU eviction.
3. No rate limiting on any endpoint
No rate limiting middleware. Review semaphore limits concurrency but the queue is unbounded — pending requests accumulate without limit.
Acceptance
🤖 Generated with Claude Code