feat(code-review): resolve addressed threads#4116
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Other Observations (not in diff)None. Files Reviewed (2 files)
Previous Review Summary (commit f899db7)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f899db7)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (4 files)
Reviewed by gpt-5.4-20260305 · 990,154 tokens Review guidance: REVIEW.md from base branch |
| ]; | ||
|
|
||
| const CODE_REVIEW_EXACT_ALLOWED_COMMANDS = [ | ||
| "gh api graphql -F owner=* -F name=* -F number=* -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){state headRefOid reviewThreads(first:100){nodes{id isResolved isOutdated viewerCanResolve path comments(first:1){totalCount nodes{body viewerDidAuthor}}}}}}}'", |
There was a problem hiding this comment.
CRITICAL: The new gh api graphql allowlist is still bypassable
These entries are still glob patterns over the raw shell command, not argument-aware exact matches. Because the placeholders like owner=* and threadId=* can absorb spaces and shell metacharacters, a review agent can smuggle extra gh api graphql flags or a second command before the required literal suffix and still satisfy this rule. That reopens arbitrary GitHub GraphQL mutations in a session that is supposed to stay read-only.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Summary
Incremental GitHub reviews can now find earlier Kilo review threads and resolve them when new commits fully fix the issue. Before resolving anything, the review checks that the thread belongs to Kilo, the changed file includes the fix, and the pull request still points to the same commit. Standard GitHub reviews and GitLab reviews keep their existing behavior.
Verification
Visual Changes
N/A
Reviewer Notes
The GitHub mutations run directly from the review agent through its existing installation token. Resolution is prompt-governed, checks only the first 100 review threads, and may partially complete if a later mutation fails.