Close GitHub guard DIFC gaps for search_commits and FF list_issues variant#6432
Conversation
search_commits and FF list_issues variant
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub guard’s DIFC labeling rules to explicitly cover two repo-scoped read tools that were previously falling back to default labeling, ensuring secrecy/integrity labels align with existing repo-aware semantics.
Changes:
- Add explicit
apply_tool_labelshandling forsearch_commits, including repo-scope resolution from the search query and repo-scoped secrecy/integrity labeling. - Treat
list_issues_ff_remote_mcp_issue_fieldsidentically tolist_issuesin tool labeling rules. - Add unit tests covering
search_commitslabeling and ensuring the FFlist_issuesvariant matcheslist_issues.
Show a summary per file
| File | Description |
|---|---|
| guards/github-guard/rust-guard/src/labels/tool_rules.rs | Adds explicit labeling coverage for search_commits and extends issues labeling to include the FF tool variant. |
| guards/github-guard/rust-guard/src/labels/mod.rs | Adds tests for search_commits tool labeling and for parity between list_issues and the FF issue-fields variant. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot fix this failing ci check https://github.com/github/gh-aw-mcpg/actions/runs/26381246169/job/77650770976?pr=6432 |
Fixed the failing CI check in commit |
The guard was missing explicit DIFC labeling for two newly observed repo-scoped read tools, causing fallback/default handling instead of repo-aware secrecy/integrity labeling. This PR adds explicit coverage so both operations align with existing guard semantics for equivalent tools.
Tool labeling updates (
tool_rules.rs)apply_tool_labelsarm forsearch_commits:resolve_search_scope(...)search_commits:<owner/repo>) when query-scoped repo is presentlist_issues_ff_remote_mcp_issue_fields, matchinglist_issuesbehavior exactly.Coverage tests (
labels/mod.rs)test_apply_tool_labels_search_commitsto assert scoped description, secrecy, and integrity behavior for repo-qualified commit search.test_apply_tool_labels_list_issues_ff_matches_list_issuesto verify the FF issue-fields variant produces identical labels/desc aslist_issuesand retains expected repo-scoped defaults.Illustrative change