Repository navigation
Enforce blocked users across PR content, commits, releases, and search - #15984
Conversation
Check parent PR authors for files and diffs, classify release and commit-search authors per item, and fail closed when commit account identity is unavailable under an active deny-list. Add Rust and real-WASM regression coverage and document the limitation. Co-authored-by: Copilot App <[email protected]>
🔒 mcpg Read-Only Stress — default AWFSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE No write leaked through any surface. Parts A and C fully confirm the read path works. Part B is Full details:
|
There was a problem hiding this comment.
🟡 Changes recommended
Critical integrity-enforcement gaps allow conflicting PR aliases and unrecognized multi-repository blocked labels to expose content from blocked or unresolved authors.
3 open issues
What changed in this PR
Extends the GitHub guard’s blocked-user response labeling to PR files and diffs, commit reads, releases, and commit search.
Changes:
- Adds author checks and parent-PR lookups, with fail-closed handling when account identity cannot be established.
- Labels commit-search results individually while preserving existing integrity levels for allowed content.
- Adds Rust and real-WASM gateway regressions and documents account-identity limitations.
| File | Description |
|---|---|
internal/proxy/blocked_users_guard_test.go |
Adds gateway regressions for blocked response content across formats and enforcement modes. |
guards/github-guard/rust-guard/src/labels/tool_rules.rs |
Uses the shared commit-search tool constant. |
guards/github-guard/rust-guard/src/labels/response_paths.rs |
Adds path-based author checks and conservative collection defaults. |
guards/github-guard/rust-guard/src/labels/response_items.rs |
Adds corresponding checks to legacy item labeling. |
guards/github-guard/rust-guard/src/labels/mod.rs |
Tests account shapes, release authors, and per-result commit-search labels. |
guards/github-guard/rust-guard/src/labels/helpers.rs |
Centralizes author denial checks and parent-PR content classification. |
guards/github-guard/rust-guard/src/labels/constants.rs |
Defines the commit-search tool-name constant. |
guards/github-guard/rust-guard/src/labels/backend.rs |
Extracts parent-PR facts from REST, envelope, and GraphQL response shapes. |
docs/CONFIGURATION.md |
Documents fail-closed behavior and commit identity limitations. |
Review effort: Max (auto)
| ctx: &PolicyContext, | ||
| ) -> Vec<String> { | ||
| if author_denied(extract_author_login(item), ctx) { | ||
| blocked_integrity(repo_full_name, ctx) |
| tool_names::SEARCH_COMMITS => { | ||
| let (items, items_path) = extract_items_array(&actual_response); |
|
@copilot address review feedback |
Co-authored-by: lpcox <[email protected]>
Addressed in |


Summary
Addresses the four remaining confirmed MCP Gateway response-labeling gaps described in github/agentic-workflows#559. The already-shipped issue-read envelope fix is unchanged. This PR is proposed remediation, not a claim that the changes have been released or deployed.
noneintegrity, including for trusted authors and merged PRs.author.user.login, and fail closed when account identity is missing under an active deny-list.The parent PR facts lookup now understands REST objects,
pull_requestenvelopes, and GraphQL singleton shapes. Configuration documentation explains the fail-closed behavior.Identity limitation
Git commit display names and email addresses are user-controlled and are not mapped to GitHub logins. When
blocked-usersis nonempty, minimized commits exposing only name/email are denied even if the actual account is not blocked. Permitting those commits requires GitHub-provided account identity. Without a deny-list, existing classification is unchanged.Regression coverage and validation
min-integrity: noneandapproved, filter and propagate modes, mixed allowed/blocked collections, text plusstructuredContent, structured-only responses, and raw plaintext diffs. Blocked content must disappear from the rebuilt output while allowed content preserves its existing behavior.cargo test --manifest-path guards/github-guard/rust-guard/Cargo.toml --quiet— 710 tests passed.make -C guards/github-guard build— rebuilt the WASM guard.go test ./internal/proxy -run 'TestBlockedUsersResponseSurfaces|TestPRContentRevisionIntegrity|TestIssueReadTrustedBotApprovedIntegrity' -count=1— passed.make agent-finished— passed, including build, lint, Go tests, and Rust tests.git diff --check— clean.Scope is limited to this MCPG bounty; no unrelated bounty changes, credential cleanup, or release/deployment changes are included.