Skip to content

fix(amazonq): limit workspace agent config permissions to servers in its folder - #3062

Draft
laileni-aws wants to merge 2 commits into
Amazon-Q-Developer:feature/laileni-fixesfrom
laileni-aws:fix/mcp-workspace-permissions
Draft

laileni-aws wants to merge 2 commits into
Amazon-Q-Developer:feature/laileni-fixesfrom
laileni-aws:fix/mcp-workspace-permissions

Conversation

@laileni-aws

Copy link
Copy Markdown
Collaborator

No description provided.

@codecov-commenter

codecov-commenter commented Nov 16, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@laileni-aws
laileni-aws force-pushed the fix/mcp-workspace-permissions branch from 0abc7d7 to 1091fa4 Compare November 17, 2026 04:23
…its folder

A workspace agent config, or a workspace mcp.json, now applies server permissions and default
enablement only to the MCP servers that it defines: a '*' in its tools enables only those
servers, and its other glob entries and its entries for other servers are skipped. A skipped
entry that names a loaded server is logged. A workspace file does not load a server whose name
has a glob character. A permission entry that is not a string is skipped in every agent config.

Adds tests.
…er name has a glob character

A workspace mcp.json server whose name has '*' or '?' is now skipped before the duplicate
check, so it no longer replaces a global mcp.json server that has the same key. Server names
lose '*' and '?' when they become keys, so 'tracker*' and 'tracker' have the same key.

The default enablement of a legacy mcp.json server no longer has a fallback for a server
without a config file path, which every legacy server has.

Adds tests for this, for permission entries across two workspace folders, and for a server
whose config file or original name is not known.
@laileni-aws
laileni-aws changed the base branch from feature/security-fixes-v2 to feature/laileni-fixes November 18, 2026 20:38
@laileni-aws
laileni-aws force-pushed the fix/mcp-workspace-permissions branch from fc52861 to fb5d76d Compare November 18, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants