Add Rust guard coverage for GitHub-controlled/advisory label policies - #9984
Conversation
There was a problem hiding this comment.
Pull request overview
Adds focused Rust guard regression coverage for security-sensitive label policies and narrows an internal backend helper’s visibility.
Changes:
- Tests Copilot Spaces, public GitHub metadata, and repository advisory labels.
- Changes
is_repo_private_with_callbackvisibility topub(crate).
Show a summary per file
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/labels/tool_rules.rs |
Adds focused policy-label tests. |
guards/github-guard/rust-guard/src/labels/backend.rs |
Restricts helper visibility to the crate. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Medium
🔒 mcpg Read-Only Stress — gVisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Notes:
Overall: PASS Run: §30093109251
|
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS Gateway enforcement detail (Part B): The mcpg tools file exposes only read tools. All 7 write tool calls returned References: §30093109313
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS
References: §30093109245
|
The Rust guard had no direct unit coverage for three security-sensitive
apply_tool_labelspolicy arms: private user metadata, public GitHub-controlled metadata, and repository security advisories. This also trims an internal backend helper that was exposed more broadly than its call sites require.Tool label policy coverage
tool_rules.rstests for:get_copilot_space,list_copilot_spaces→private:usersecrecy +project:githubintegritysearch_orgs,list_global_security_advisories,get_global_security_advisory,github_support_docs_search→ empty secrecy +project:githubintegritylist_repository_security_advisories,list_org_repository_security_advisories→ private repo/owner scope secrecy + writer integrityAPI surface reduction
is_repo_private_with_callbackfrompubtopub(crate).Representative pattern