Built-in Slack MCP integration requests full scope superset even when only read tools are exposed
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- shell
- Lĩnh vực
- authentication, cli, security
Hướng nghiên cứu
Look for the Slack MCP server implementation in the copilot-cli codebase, likely under a directory like 'mcp' or 'servers'. Find where the OAuth authorization URL is constructed, particularly the scope parameter. The fix involves dynamically generating the scope list based on the exposed tools (slack_read_channel, slack_read_thread, slack_list_channel_members, slack_search_public) or adding a configuration option in mcp-config.json. Test by triggering the OAuth flow locally and verifying the generated URL's scope parameter.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When authenticating the built-in Slack MCP server ( mcp.slack.com ) via Copilot CLI, the generated OAuth consent URL requests the full superset of Slack scopes — including write scopes ( chat:write , files:write , channels:write , canvases:write , lists:write , reactions:write , im:write , mpim:write , groups:write ) — even though the session only exposes a small set of read-only tools:
• slack_read_channel
• slack_read_thread
• slack_list_channel_members
• slack_search_public
Example generated authorize URL (redacted):
Expected behavior
Actual behavior
Users are asked to grant far broader permissions (including message sending, file uploads, channel creation, list/canvas writes) than the tool set they can actually use, violating least-privilege expectations.
Suggested fix
• Scope the OAuth request dynamically to the active/allowed tool set, or
• Provide a config option (e.g. in mcp-config.json ) to restrict which scopes are requested for the built-in Slack MCP connection.
Affected version
1.0.87-0
Steps to reproduce the behavior
- Ensure the built-in Slack MCP server ( mcp.slack.com ) is available in Copilot CLI (no custom config needed — it's a first-party integration).
- In an interactive Copilot CLI session, run /mcp (or trigger any Slack-related request) so Copilot needs to authenticate with Slack.
- Confirm only a subset of read tools are currently exposed for the session, e.g. slack_read_channel , slack_read_thread , slack_list_channel_members , slack_search_public (visible via the tool list / <tools_changed_notice> or /mcp output).
- Trigger the OAuth flow (Copilot opens/prints an authorization URL and starts a local loopback listener, e.g. http://127.0.0.1:PORT/ ).
- Inspect the generated https://slack.com/oauth/v2_user/authorize?... URL's scope= query parameter.
- Observe: the scope parameter includes the full superset of Slack scopes — including write scopes ( chat:write , files:write , channels:write , canvases:write , lists:write , reactions:write , im:write , mpim:write , groups:write ) and additional read scopes ( users:read , users:read.email , emoji:read , search:read.private/mpim/im/files/users ) — none of which are required by the 4 tools actually exposed.
Expected behavior
The requested scope list should match only the tools actually enabled/exposed for the current session (or at minimum, be configurable), rather than always requesting the full write+read superset.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-cli
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#4932 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#4909 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/copilot-cli#4906 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4729 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#156 ·
-
Priority/High ready-for-agent Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
comp/cli P3 type/docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#119756 · 1 bình luận ·
-
comp: build/pipeline type: bug version: current (v17+)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
angular/angularfire#3766 ·
-
out-of-date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
CachyOS/CachyOS-PKGBUILDS#1903 ·