Repository navigation
fix(mcp): require workspace admin to change workflow MCP server visibility - #9576
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[High impact] The PR appears safe to merge; visibility changes require admin authority while writer edits remain supported. SummaryRequires workspace admin authority to change workflow MCP server visibility.
No actionable issues found. Tests were inspected, not run.
|
This branch was previously deployed
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.
Summary
POST /api/mcp/workflow-serversandPATCH /api/mcp/workflow-servers/[id]acceptedisPublicat workspacewrite, while the v2 operations for the same writes requireadminbecause a public server answers/api/mcp/serve/{serverId}with no credential. A write member could therefore turn a private server into an unauthenticated execution endpointperformCreateWorkflowMcpServer/performUpdateWorkflowMcpServernow take a requiredallowVisibilityChange, mirroringallowDestinationChangeon external MCP servers. Internal routes passpermission === 'admin'; the v2 use cases passtrue(their operations are alreadyadmin)isPublicis never written and the UPDATE only matches when the submitted value equals the stored one, so a write member can still rename/re-describe a server (the edit form always sendsisPublic), any visibility change returns 403, and a concurrent admin flip is never reverted. Missing / other-workspace servers still return 404Type of Change
Testing
workflow-mcp-visibility.integration.tsagainst real Postgres (7 tests); red→green verified: 4 refusal tests fail on the pre-fix lifecycle, 3 controls pass on bothworkflow-mcp-lifecycle.test.ts,workflow-deployments.test.ts,app/api/v2/workflow-mcp-servers/**,capability-declarations.test.ts,operations.test.ts(48 passing)bun run lint; type-check andcheck:auditsin CIChecklist
test-auditauthoring gate)