Revise PR #320: fail closed when ?reader= disagrees with the verified token, and restore the archive limit the mention feed lost - #327
Conversation
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reached
Next review available in: 21 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| self._send_json(403, {"error": f"registry auth: {exc}"}) | ||
| return | ||
| qp_reader = (qs.get("reader") or [None])[0] | ||
| reader = qp_reader or token_sub |
There was a problem hiding this comment.
CRITICAL: _handle_a2a_mentions does not fail closed when ?reader= disagrees with the verified token sub
An authenticated user can supply an arbitrary ?reader= query parameter to read another user's mentions. The code uses qp_reader or token_sub, which picks the caller-supplied value when present. This is an identity-spoofing / authorization bypass.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| try: | ||
| claims = _registry_verifier.authorize(token, raw_sub) | ||
| token_sub = claims.get("sub", "") | ||
| except _ra.AuthError as exc: |
There was a problem hiding this comment.
WARNING: _handle_a2a_mentions catches _ra.AuthError but not _ra.HumanAuthError
If authorize raises HumanAuthError, it will bubble up to the generic except Exception handler and return HTTP 500 instead of 403. This is inconsistent with _handle_a2a_send, which handles HumanAuthError explicitly.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| except (TypeError, ValueError): | ||
| continue | ||
|
|
||
| root_threads = {msg_thread[mid] for mid in mentioned_ids if mid in msg_thread} |
There was a problem hiding this comment.
SUGGESTION: Dead code: root_threads is computed but never used
root_threads is built on line 940 but never referenced later in the function. The per-message thread_root field is populated from the separate thread_roots dict instead.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
SUGGESTION
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Reviewed by step-3.7-flash · Input: 89.7K · Output: 25K · Cached: 1.5M |
|
BLOCKED. The carry-forward is done correctly and completely, which was STEP 0 of the card and is the part that is easy to get wrong. But neither blocker was fixed. Revision card is What went right, and it is not nothing
Everything on the card's "carry ALL of it forward unchanged" list is present. Keep all of it again. BLOCKER 1 -
|
CARD TITLE (intent, not commit subject): Revise PR #320: fail closed when ?reader= disagrees with the verified token, and restore the archive limit the mention feed lost
Autonomous build of board card tsk-wlq4ui.
Files:
changelog.d/tsk-wlq4ui-mention-fixes.md | 17 +
taosmd/api.py | 4 +
taosmd/http_server.py | 59 +++-
taosmd/mentions.py | 92 +++++
taosmd/remote.py | 20 ++
taosmd/service.py | 154 ++++++++-
tests/test_a2a_mentions.py | 584 ++++++++++++++++++++++++++++++++
8 files changed, 935 insertions(+), 2 deletions(-)