Commit 6989c26
authored
Guard coverage: classify 21 granular github-mcp-server mutation tools (#3860)
21 recently added granular MCP tools in `github-mcp-server` were falling
through to `operation = "read"` in the guard, bypassing DIFC integrity
enforcement entirely. These tools are decomposed versions of existing
composite tools (`issue_write`, `sub_issue_write`,
`update_pull_request`, `pull_request_review_write`) that were already
correctly classified.
## `tools.rs` — operation classification
**Added to `WRITE_OPERATIONS`** (17 tools):
- Granular issue field updates: `update_issue_assignees`,
`update_issue_body`, `update_issue_labels`, `update_issue_milestone`,
`update_issue_state`, `update_issue_title`, `update_issue_type`
- Sub-issue management: `add_sub_issue`, `remove_sub_issue`,
`reprioritize_sub_issue`
- PR review operations: `add_pull_request_review_comment`,
`create_pull_request_review`, `delete_pending_pull_request_review`,
`request_pull_request_reviewers`, `resolve_review_thread`,
`submit_pending_pull_request_review`, `unresolve_review_thread`
**Added to `READ_WRITE_OPERATIONS`** (4 tools, consistent with
`update_pull_request` placement):
- `update_pull_request_body`, `update_pull_request_draft_state`,
`update_pull_request_state`, `update_pull_request_title`
## `tool_rules.rs` — DIFC label application
Added four new match arms in `apply_tool_labels`, each applying
repo-scoped secrecy (`S(repo)`) and writer-level integrity — following
the same pattern as their composite counterparts:
```rust
"update_issue_assignees" | "update_issue_body" | ... => {
secrecy = apply_repo_visibility_secrecy(&owner, &repo, repo_id, secrecy, ctx);
integrity = writer_integrity(repo_id, ctx);
}
```
Groups: granular issue updates, sub-issue management, granular PR
updates, PR review tools.
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `example.com`
> - Triggering command: `/tmp/go-build1018101650/b514/launcher.test
/tmp/go-build1018101650/b514/launcher.test
-test.testlogfile=/tmp/go-build1018101650/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s 4016�� fg
rg/x/net@v0.52.0-ifaceassert x_amd64/vet --gdwarf-5 --64 -o x_amd64/vet
fg 4016774/b445/_pkg_.a -trimpath x_amd64/vet -p
ntio/asm/cpu/arm--version -lang=go1.25 x_amd64/vet` (dns block)
> - `invalid-host-that-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build1018101650/b496/config.test
/tmp/go-build1018101650/b496/config.test
-test.testlogfile=/tmp/go-build1018101650/b496/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build1018101650/b387/vet.cfg 1.80.0/internal/go1.25.8
elemetry.io/otel-c=4 x_amd64/vet --gdwarf-5 ity -o x_amd64/vet -o g_.a
-trimpath x_amd64/vet -p telabs/wazero/in-atomic -lang=go1.25
x_amd64/vet` (dns block)
> - `nonexistent.local`
> - Triggering command: `/tmp/go-build1018101650/b514/launcher.test
/tmp/go-build1018101650/b514/launcher.test
-test.testlogfile=/tmp/go-build1018101650/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s 4016�� fg
rg/x/net@v0.52.0-ifaceassert x_amd64/vet --gdwarf-5 --64 -o x_amd64/vet
fg 4016774/b445/_pkg_.a -trimpath x_amd64/vet -p
ntio/asm/cpu/arm--version -lang=go1.25 x_amd64/vet` (dns block)
> - `slow.example.com`
> - Triggering command: `/tmp/go-build1018101650/b514/launcher.test
/tmp/go-build1018101650/b514/launcher.test
-test.testlogfile=/tmp/go-build1018101650/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s 4016�� fg
rg/x/net@v0.52.0-ifaceassert x_amd64/vet --gdwarf-5 --64 -o x_amd64/vet
fg 4016774/b445/_pkg_.a -trimpath x_amd64/vet -p
ntio/asm/cpu/arm--version -lang=go1.25 x_amd64/vet` (dns block)
> - `this-host-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build1018101650/b523/mcp.test
/tmp/go-build1018101650/b523/mcp.test
-test.testlogfile=/tmp/go-build1018101650/b523/testlog.txt
-test.paniconexit0 -test.timeout=10m0s fg 4016774/b393/_pkg_.a -I
x_amd64/vet --gdwarf-5 g/grpc/internal/info -o x_amd64/vet fg
02580/b008/vet.cfg /tmp/go-build1004016774/b288/ x_amd64/vet . --gdwarf2
--64 x_amd64/vet` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/github/gh-aw-mcpg/settings/copilot/coding_agent)
(admins only)
>
> </details>3 files changed
Lines changed: 258 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4735 | 4735 | | |
4736 | 4736 | | |
4737 | 4737 | | |
| 4738 | + | |
| 4739 | + | |
| 4740 | + | |
| 4741 | + | |
| 4742 | + | |
| 4743 | + | |
| 4744 | + | |
| 4745 | + | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
| 4810 | + | |
| 4811 | + | |
| 4812 | + | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
| 4818 | + | |
| 4819 | + | |
| 4820 | + | |
| 4821 | + | |
| 4822 | + | |
| 4823 | + | |
| 4824 | + | |
| 4825 | + | |
| 4826 | + | |
| 4827 | + | |
| 4828 | + | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
4738 | 4834 | | |
4739 | 4835 | | |
4740 | 4836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
560 | 607 | | |
561 | 608 | | |
562 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
92 | 122 | | |
93 | 123 | | |
94 | 124 | | |
| |||
307 | 337 | | |
308 | 338 | | |
309 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
310 | 425 | | |
0 commit comments