guard: add 11 CLI-only GitHub operations to guard coverage#7935
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add missing CLI-only operations to guard coverage
guard: add 11 CLI-only GitHub operations to guard coverage
Jun 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the GitHub guard’s synthetic tool coverage to include 11 gh CLI-only GitHub write/mutate operations that weren’t reachable via upstream MCP tools, ensuring they’re classified as write/read-write operations and receive explicit DIFC labeling in the Rust guard.
Changes:
- Added 10 new CLI-only entries to
WRITE_OPERATIONSand 1 new entry toREAD_WRITE_OPERATIONS, maintaining sorted order forbinary_search. - Updated
apply_tool_labelsmatching intool_rules.rsto explicitly label the new repo-scoped and project-scoped operations consistent with existing patterns (edit_repository/projects_write).
Show a summary per file
| File | Description |
|---|---|
| guards/github-guard/rust-guard/src/tools.rs | Adds the 11 CLI-only operations into the correct write/read-write classification lists while preserving sorted invariants enforced by tests. |
| guards/github-guard/rust-guard/src/labels/tool_rules.rs | Adds the new tool names to the appropriate labeling match arms so they receive repo-scoped or org/project-scoped DIFC labels. |
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: 0
This was referenced Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GitHub guard fully covered all 88 upstream MCP tools but was missing 11 write operations reachable only via
ghCLI commands — leaving them without synthetic tool names inWRITE_OPERATIONS/READ_WRITE_OPERATIONSand without explicit DIFC labels intool_rules.rs.tools.rsWRITE_OPERATIONS— 10 new entries (maintained sorted order forbinary_search):archive_project_item/unarchive_project_item—gh project item-archive [--undo]create_project_draft_item—gh project item-createcreate_project_field/delete_project_field—gh project field-create/deletecreate_repository_autolink/delete_repository_autolink—gh repo autolink create/deletecreate_linked_branch—gh issue developmark_project_template/unmark_project_template—gh project mark-template [--undo]READ_WRITE_OPERATIONS— 1 new entry:update_project_draft_issue—gh project item-edit --title/--bodytool_rules.rsTwo grouped arms added:
Repo-scoped (mirrors
edit_repository—S(repo), writer integrity onrepo_id):Project-scoped (mirrors
projects_write— org-scoped baseline, writer integrity onowner):