Skip to content

feat(slack): add allowlist controls for agent access - #211

Open
Youcef3939 wants to merge 1 commit into
yc-software:mainfrom
Youcef3939:feat/slack-gate
Open

feat(slack): add allowlist controls for agent access#211
Youcef3939 wants to merge 1 commit into
yc-software:mainfrom
Youcef3939:feat/slack-gate

Conversation

@Youcef3939

@Youcef3939 Youcef3939 commented Aug 4, 2026

Copy link
Copy Markdown

this pull request introduces new configuration options to control which users and channels the slack plugin will process events from, adding support for allowlists and direct message restrictions. these changes enhance security and flexibility by enabling administrators to restrict access to specific users and channels, and to disable direct message handling if desired. the implementation includes environment variable parsing, enforcement in event handlers, and comprehensive tests

configuration and environment parsing:

  • added allow_dms, user_allowlist, and channel_allowlist options to the SlackPluginConfig interface, with parsing functions to interpret environment variables (SLACK_ALLOW_DMS, SLACK_USER_ALLOWLIST, SLACK_CHANNEL_ALLOWLIST). [1] [2]
  • updated slackPluginConfigFromEnv to set defaults and parse the new configuration options

event handling and enforcement:

  • implemented the canProcessSlackEvent function to enforce allowlist and DM restrictions, and integrated it into Slack event handlers to prevent unauthorized events from being processed [1] [2] [3] [4]
  • updated the plugin startup and dependency injection to pass the new configuration to event handlers

testing:

  • added and updated tests to verify that allowlists and DM restrictions are correctly enforced, including cases for user/channel allowlists and DM blocking [1] [2] [3] [4]
  • extended the test fixture and integration tests to support and validate the new configuration options [1] [2]

these changes provide fine-grained control over which slack events are handled, improving security and compliance for deployments

issue #146


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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.

1 participant