Close GitHub guard coverage gaps for discussion mutations - #12354
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The added names are dispatcher methods rather than tools, leaving the real discussion repo-scoping gap unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Attempts to add guard classification and DIFC labeling for discussion and review-thread mutations.
Changes:
- Adds write/read-write operation entries.
- Adds repository-scoped label rules and Rust tests.
File summaries
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/tools.rs |
Adds operation classifications and tests. |
guards/github-guard/rust-guard/src/labels/tool_rules.rs |
Adds labeling rules and regression cases. |
Review details
Suppressed comments (2)
guards/github-guard/rust-guard/src/tools.rs:74
unmark_answeris likewise only adiscussion_comment_writemethod value, not a tool name delivered to the guard. This dead bucket entry cannot affect classification; retain coverage on the parent tool and inspecttool_args.methodonly where method-specific behavior is needed.
"unmark_answer", // removes the accepted-answer state from a discussion comment
guards/github-guard/rust-guard/src/labels/tool_rules.rs:719
- The upstream server exposes
resolve_threadas a method ofpull_request_review_write, not as a standalone tool. The existing parent-tool arm at line 672 already applies repo-scoped writer labels, so this arm and the standalone-name regression case never execute for production input; testpull_request_review_writewithmethod: "resolve_thread"instead.
| "resolve_thread"
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| | "mark_answer" // marks a discussion comment as the accepted answer | ||
| | "unmark_answer" // removes the accepted-answer state from a discussion comment |
| "lock_issue", // gh issue lock | ||
| "lock_pull_request", // gh pr lock | ||
| "mark_all_notifications_read", | ||
| "mark_answer", // marks a discussion comment as the accepted answer |
| "reprioritize_sub_issue", // PATCH — reorder sub-issues | ||
| "request_pull_request_reviewers", // POST /repos/.../pulls/{number}/requested_reviewers | ||
| "resolve_review_thread", // PUT /graphql — resolveReviewThread | ||
| "resolve_thread", // PUT /graphql — resolves a pull request review thread |
|
@copilot address review feedback |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot fix the failing ci check https://github.com/github/gh-aw-mcpg/actions/runs/33659392634/job/100345907416?pr=12354 |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Fixed in 12b8bca. The Rust guard test had a missing closing delimiter and #[test] attribute; the focused tests and full |
🔒 mcpg Read-Only Stress — gvisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Notes:
|
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE No write leaked in this run. Gaps: (1) Part B's write tools were never registered in the backend catalog because gh-aw's
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE No write leaked in this run. Gaps: (1) Part B — the github CLI/MCP tool catalog exposed only 23 read tools; no write tool was present to call, so gateway-level enforcement (vs. backend
|
The GitHub guard lacked complete classification and DIFC labeling for three upstream MCP mutations:
mark_answer,unmark_answer, andresolve_thread.mark_answerandunmark_answeras writes.resolve_threadas read-write.