fix(mcp): gate maintainer-noise behind maintainer approval/write access - #1464
Merged
Merged
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1464 +/- ##
=======================================
Coverage 95.44% 95.44%
=======================================
Files 194 194
Lines 21054 21054
Branches 7619 7619
=======================================
Hits 20094 20094
Misses 383 383
Partials 577 577
🚀 New features to boost your workflow:
|
This was referenced Jun 27, 2026
Closed
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
gittensory_get_maintainer_noiseMCP tool used the cachedrequireRepoAccessgate and could return maintainer-only queue-noise analytics to a session with stale/cached MEMBER/COLLABORATOR evidence instead of requiring live maintainer/write permission.Description
await this.requireRepoAccess(fullName)toawait this.requireRepoApprovalQueueAccess(fullName)insrc/mcp/server.tsforgetMaintainerNoise.identityparameter toconnectTestClientintest/unit/mcp-output-schemas.test.tsso MCP server tests can simulate session identities.author_association: "MEMBER"is denied access togittensory_get_maintainer_noise(the test checks the returned error and that no structured content is exposed).Testing
git diff --checkwhich produced no whitespace or conflict errors and passed locally.npm run typecheck(tsc --noEmit) which completed successfully with no type errors.npx vitest run test/unit/mcp-output-schemas.test.ts -t "maintainer_noise" --reporter=verboseand the added regression plus the maintainer-noise validation tests passed; an earlier attempt to run the entire file experienced timeouts on unrelated, pre-existing tests, but the targeted regression and schema checks for this change succeeded.Codex Task