Commit 911405c
authored
Add DIFC labeling rule for
`create_pull_request_with_copilot` (remote-only tool) was covered by the
`create_*` prefix pattern in `tools.rs` for write classification, but
had no explicit match arm in `apply_tool_labels`, causing it to fall
through to the default catch-all with no repo-scoped secrecy or writer
integrity labels applied.
## Changes
- **`guards/github-guard/rust-guard/src/labels/tool_rules.rs`**: Add
`create_pull_request_with_copilot` to the existing Issue/PR write
operations match arm alongside `create_pull_request`, applying `S(repo)`
secrecy and writer-level integrity — identical labeling to the standard
PR creation tool.
```rust
// === Issue/PR write operations (repo-scoped) ===
"create_issue" | "issue_write" | "sub_issue_write" | "add_issue_comment"
| "create_pull_request" | "create_pull_request_with_copilot" // ← added
| "update_pull_request" | "merge_pull_request"
| "pull_request_review_write" | "add_comment_to_pending_review"
| "add_reply_to_pull_request_comment" => {
secrecy = apply_repo_visibility_secrecy(&owner, &repo, repo_id, secrecy, ctx);
integrity = writer_integrity(repo_id, ctx);
}
```
> [!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-build2069436726/b514/launcher.test
/tmp/go-build2069436726/b514/launcher.test
-test.testlogfile=/tmp/go-build2069436726/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -W .cfg 8221058/b288/ x_amd64/vet
. --gdwarf2` (dns block)
> - `invalid-host-that-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build2069436726/b496/config.test
/tmp/go-build2069436726/b496/config.test
-test.testlogfile=/tmp/go-build2069436726/b496/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build2069436726/b379/vet.cfg @v1.1.3/cpu/cpu.go1.25.8
om/tetratelabs/w-c=4 x_amd64/vet -I nal/encoding/def-atomic -I
x_amd64/vet -I hB8eipdrZ -I x_amd64/vet --gdwarf-5
telabs/wazero/in-atomic -o x_amd64/vet` (dns block)
> - `nonexistent.local`
> - Triggering command: `/tmp/go-build2069436726/b514/launcher.test
/tmp/go-build2069436726/b514/launcher.test
-test.testlogfile=/tmp/go-build2069436726/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -W .cfg 8221058/b288/ x_amd64/vet
. --gdwarf2` (dns block)
> - `slow.example.com`
> - Triggering command: `/tmp/go-build2069436726/b514/launcher.test
/tmp/go-build2069436726/b514/launcher.test
-test.testlogfile=/tmp/go-build2069436726/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -W .cfg 8221058/b288/ x_amd64/vet
. --gdwarf2` (dns block)
> - `this-host-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build2069436726/b523/mcp.test
/tmp/go-build2069436726/b523/mcp.test
-test.testlogfile=/tmp/go-build2069436726/b523/testlog.txt
-test.paniconexit0 -test.timeout=10m0s 8221�� .cfg
ache/go/1.25.8/x64/src/database/sql/driver/driver.go x_amd64/vet
--gdwarf-5 g/grpc/credentia/usr/bin/runc -o x_amd64/vet .cfg��
k3QZ/k0KRG1xFvJtggzT2k3QZ -trimpath x_amd64/vet -p 8221058/b468/
-lang=go1.16 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>create_pull_request_with_copilot (#3651)3 files changed
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4381 | 4381 | | |
4382 | 4382 | | |
4383 | 4383 | | |
| 4384 | + | |
| 4385 | + | |
| 4386 | + | |
| 4387 | + | |
| 4388 | + | |
| 4389 | + | |
| 4390 | + | |
| 4391 | + | |
| 4392 | + | |
| 4393 | + | |
| 4394 | + | |
| 4395 | + | |
| 4396 | + | |
| 4397 | + | |
| 4398 | + | |
| 4399 | + | |
| 4400 | + | |
| 4401 | + | |
| 4402 | + | |
| 4403 | + | |
| 4404 | + | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
4384 | 4409 | | |
4385 | 4410 | | |
4386 | 4411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
| 573 | + | |
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments