fix(mcp): gate approval queue by repo maintainer scope#941
Conversation
|
reviewbot — ⏳ Waiting for CI to finish before the gate review. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
…ecisions-authorization-flaw # Conflicts: # test/unit/mcp-automation-state.test.ts
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 408bd86 | Commit Preview URL Branch Preview URL |
Jun 21 2026, 06:09 AM |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #941 +/- ##
==========================================
- Coverage 96.64% 96.61% -0.03%
==========================================
Files 110 110
Lines 15041 15058 +17
Branches 5435 5441 +6
==========================================
+ Hits 14536 14549 +13
- Misses 104 105 +1
- Partials 401 404 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Motivation
Description
requireRepoApprovalQueueAccessinsrc/mcp/server.tsthat first checks repo-scoped maintainer/owner/operator scope via the session access scope and then verifies live GitHub write permission viagetRepositoryCollaboratorPermission.listPendingActionsanddecidePendingActioninsrc/mcp/server.tsto callrequireRepoApprovalQueueAccessinstead of the weakerrequireRepoManageAccess.upsertOfficialMinerDetectionand added regression tests intest/unit/mcp-automation-state.test.tsthat assert a miner-only session is forbidden even when GitHub reports write access and that sessions without live write are denied.Testing
npm run typecheckand it succeeded with no errors.npx vitest run test/unit/mcp-automation-state.test.ts --reporter=verboseand all tests passed (1test file,17tests total passed).Codex Task