Users reported a security concern with the Slack official plugin where topics from staff categories were incorrectly being sent to designated Slack channels. kuyashi noted that the documentation was misleading regarding the necessity of the /discourse slash command for notifications to function. codinghorror suggested a workaround: ensuring the user account Slack posts on behalf of is not a staff member. Nick confirmed this is the only built-in method currently available. However, mcwumbly identified a persistent bug where running /discourse watch all bypassed visibility restrictions, allowing posts from private staff categories to appear in Slack even when the slack_discourse_username could not see those categories. vinothkannans clarified the issue, and mcwumbly expressed concern about the privacy implications. In response, vinothkannans submitted a pull request to fix the logic. After a brief clarification on the review process mcwumbly, vinothkannans updated the PR, and mcwumbly confirmed the issue is now resolved.
I have the plugin setup. However it is sending topics and replies from staff categories into the designated Slack channel. This, obviously presents an issue regarding privilege - I doubt this is intentional, so is there a work-around ?
Also, regarding the setup docs on the repo page above:
after step 4 it states:
By default, every new post on your Discourse will now create a Slack message in the channel you specified..
… this should be changed to state that setting up the slash command is not optional as once this plugin is installed, web-hook setup and a new topic is created/replied - it doesn’t send to slack channel unless these instructions are followed, followed by entering the appropriate /command in the slack channel assigned: /discourse [watch|follow|mute|help|status] [category|all] watch – notify this channel for new topics and new replies follow – notify this channel for new topics mute – stop notifying this channel status – show current notification state and categories
i.e. /discourse watch all
only then will new topics/replies be sent successfully to the slack channel.
@nick should answer more specifically, but I think the correct way to handle this, is to make sure the user Slack is posting on behalf of, is not a staff user?
I’m looking forward to encouraging more people to use the plugin in their own channels now that they can subscribe to particular tags, but concerned that this issue leaves the door open for people to access categories that staff on the site assume are private.
@vinothkannans after all your work to add tag support and better test coverage of the slack plugin, do you have thoughts on how best to address this issue?