Allow configured tools in shared Slack channels - #1238
Conversation
The operator hardening made every shared Slack turn deny all tools, while the later configurable untrusted-turn ceiling was wired only for WhatsApp. Slack accounts therefore had no supported way to restore MCP access under explicit policy. Persist and expose the existing audience and name-policy ceiling settings for Slack with fail-closed defaults. Document account-wide and UI-storage security constraints, and cover defaults, round trips, redaction, and invalid values.
Greptile SummaryThe PR adds persisted Slack configuration for explicitly delegating untrusted-turn tool selection to configured policies while retaining fail-closed defaults.
Confidence Score: 5/5The PR appears safe to merge because the new Slack settings remain fail-closed by default and are consistently propagated into the existing tool-policy boundary. The added fields deserialize compatibly for existing accounts, survive persistence and configuration updates, map to the gateway’s untrusted-turn ceiling, and use policy-group names that match Slack’s runtime chat classification.
|
| Filename | Overview |
|---|---|
| crates/slack/src/config.rs | Adds fail-closed Slack tool-ceiling fields, exposes them through the shared configuration view, preserves them in redacted output, and covers defaults and serialization behavior. |
| crates/config/src/template.rs | Adds commented Slack examples for both untrusted-turn ceiling settings. |
| docs/src/slack.md | Documents Slack configuration, restrictive policy examples, retained privileged-command boundaries, and web UI storage limitations. |
| docs/src/channels.md | Updates the shared channel security model to describe explicit Slack and WhatsApp ceiling overrides. |
| docs/src/tool-policy.md | Clarifies how supported channel accounts can lift the default ceiling while remaining subject to layered tool policies. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Slack message] --> B{Operator direct chat?}
B -->|Yes| C[Trusted operator context]
B -->|No| D[Slack untrusted-turn ceiling]
D --> E{Audience setting}
E -->|public| F[Public-audience tools only]
E -->|trusted| G[Trusted-audience tools eligible]
F --> H{Tool-name setting}
G --> H
H -->|deny_all| I[No tools]
H -->|policy| J[Apply global, provider, chat-type, and sender policies]
J --> K[Model-visible tool set]
Reviews (1): Last reviewed commit: "fix(slack): allow configured tools in sh..." | Re-trigger Greptile
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
untrusted_audienceanduntrusted_toolssettingsValidation
Completed
cargo fmt --all -- --checkcargo test -p moltis-slack config::testsjust lint./scripts/local-validate.sh 1238Remaining
browser_profile_lock_prevents_live_singleton_cleanupfailure tracked asmoltis-qxgfManual QA
Not performed because this environment has no Slack workspace credentials. Suggested verification:
untrusted_audience = "trusted"anduntrusted_tools = "policy"./sh, privileged commands, and owner-private prompt context remain unavailable outside an operator direct chat.