Skip to content

Security

What leaves the machine

The plugin talks to two Slack endpoints and nothing else:

  • https://mcp.slack.com/mcp, through the account's own MCP server, for Slack's tools;
  • https://slack.com/api/, for auth.test, assistant.search.context, conversations.mark and conversations.invite.

A read sends only what the call names: channel ids, a cursor bound to the account and scope, a thread key, a search query built from the signed-in user's own id. Nothing is sent to any other host, and no telemetry is collected.

Credentials

The vendor's MCP server holds the OAuth grant; OpenCode stores and refreshes it per server, and the plugin resolves it through ctx.integration.connection only when it must call Slack's Web API. src/provider/web.ts is the only module that reads the access token. It puts the token in one Authorization header and returns Slack's answer with token-shaped strings scrubbed out. A failure names Slack's error code, never the answer or the token. Status, logs and events never carry a credential: status reasons and a shortfall's words are redacted and cut to 160 characters by the contract's redactReason.

Fixtures and tests are synthetic: every person, channel, message and token in fixtures/ and test/ is invented.

Scopes

oauth.scopes and each alias's profile scopes are the most a sign-in may ask for, never what it grants. The alias's access is the person's choice: Read-only asks only the read scopes, and Read and write asks the read and write scopes. The default list is the consent-list reads (channels:read, groups:read, im:read, mpim:read), public-channel search, the user profile, the private and direct-message searches the mentions source uses, direct-message and group-message history, the public and private channel write scopes (channels:write, groups:write), chat:write, im:write and files:write. The write scopes let Slack's slack_create_conversation tool create a channel and invite the people named in user_ids, let channel_invite add people to a channel that already exists, and let mark_read mark a channel or a direct message read. chat:write lets the slack.send and slack.reply actions post with chat.postMessage and the slack.delete action remove the account's own message. im:write lets slack.send open the direct message with the person it names, and files:write lets it share the files it previewed.

A scope the sign-in does not hold is a shortfall, never a widened grant: sign_in names the choice that would allow it, settings says this deployment's options do not ask for it, and provider_admin says the Slack app does not offer it.

One power is deliberately not default:

  • groups:history, needed to read a private channel's history. Add it to the app and to oauth.scopes before reading a private G… channel.

mpim:write is not default either; add it before mark_read marks a group message read. Scopes are fixed when a sign-in is granted, so a person signs in again after an upgrade that adds one.

docs/slack-app-manifest.json is a complete app manifest; the plugin requests a subset of it.

Access and confirmation

access is the ceiling and the contract enforces it: read methods run at every level, a write asks at ask-changes and is off at read-only, and a method's effect narrows it further. mentions_list, direct_list, direct_thread_read, Slack's private search and Slack's file read carry effect: deny, so they are denied at every level, all included; a later allow rule for one agent or tool is the only way to run one. Slack's raw write tools, slack_send_message, slack_send_message_draft, slack_schedule_message and slack_complete_file_upload, carry effect: deny for the same reason: each takes any conversation id the model supplies, and its ask shows the words but not who receives them.

A non-read call over RPC needs a confirmation: an OpenCode ask, or a host-signed action grant bound to the method, the account, the manifest hash and the exact input. An allow rule alone is not a confirmation. The plugin declares three actions, slack.send, slack.reply and slack.delete. Each preview writes nothing and answers a plan; each commit takes only that plan and needs the person's confirmation, so the conversation and the words cannot change between the confirmation and the write. slack.send resolves a person's direct message from their user id at the time of the send and refuses a direct message's own D… id, which can belong to someone else. Slack's own tools, mark_read and channel_invite are confirmed the same way.

Untrusted data

Every answer carries trust: "untrusted". Slack message text is data: the plugin never follows it, never echoes it into status, and never uses it to choose a tool or a recipient. A message whose title or text holds a credential is refused (refused[], reason secret) and the cursor moves past it.

Reporting

See SECURITY.md.