Add synthetic guard coverage for CLI-only issue, repository, and Projects v2 mutations#7888
Conversation
There was a problem hiding this comment.
Pull request overview
This PR closes synthetic-guard coverage gaps for mutating operations reachable via gh (CLI-only) by extending the Rust GitHub guard’s write-operation classification and ensuring DIFC labels for these operations match existing mutation patterns.
Changes:
- Extend
WRITE_OPERATIONSto include CLI-only mutations:delete_repository,delete_issue, and several Projects v2 operations (copy_project,update_project,delete_project,link_project,unlink_project). - Apply labeling rules so
delete_issue/delete_repositoryare treated as repo-scoped destructive writes, and the new Projects v2 operations inherit the existing org-scopedprojects_writelabeling path. - Add/extend focused unit tests to lock in classification coverage and label parity.
Show a summary per file
| File | Description |
|---|---|
| guards/github-guard/rust-guard/src/tools.rs | Adds new synthetic CLI-only mutating operations to the write-operation classifier and extends coverage tests. |
| guards/github-guard/rust-guard/src/labels/tool_rules.rs | Ensures new synthetic operations follow existing repo-scoped and Projects v2 labeling paths for secrecy/integrity. |
| guards/github-guard/rust-guard/src/labels/mod.rs | Adds parity/regression tests validating Projects alias labeling and repo-scoped write integrity for destructive deletes. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot fix failing ci checks |
Both tls.go and tls_config.go declared MinTLSVersion, NewServerTLSConfig, and NewClientTLSConfig, causing a redeclaration compile error. The tls_config.go file was accidentally introduced in the previous session; tls.go is the canonical file that exists on main. Remove the duplicate and its test file.
Fixed in 51a0bb8. The failures were caused by |
The GitHub guard already covered the upstream
github-mcp-servertool surface, but it still missed 7 mutating operations reachable throughgh. Those gaps meant CLI-only repository deletion, issue deletion, and several Projects v2 mutations could bypass the guard’s synthetic tool classification and DIFC labeling.Add missing synthetic write operations
WRITE_OPERATIONSin the Rust guard to cover:delete_repositorydelete_issueupdate_projectdelete_projectcopy_projectlink_projectunlink_projectAlign DIFC labeling with existing mutation patterns
delete_issueanddelete_repositoryas repo-scoped destructive writes, using the same secrecy/integrity rules as other repository mutations.projects_writelabeling path so they inherit owner-scoped writer integrity consistently.Lock in coverage with focused guard tests
projects_write.delete_issueanddelete_repository.Example of the new coverage shape: