Repository navigation
fix(slack): refuse binding a Search bot to a different app or workspace than members - #9109
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] This PR appears safe to merge. SummaryNew Slack Search bindings now check the bot against the organization's member app and workspace before saving.
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
configureSlackSearchInstallation) created a new installation without checking the organization's member Slack app, so a bot left over from an earlier install could be bound to a different app or workspace than the members' accounts — a state the install flow already refuses, and one that leaves member setup stucksetup.tsintoorganization-slack-app.ts, so both paths share one implementation and one messagerequireSlackSearchAppAvailabletakes the caller's transaction: enabling a custom bot and completing member setup looked up the Slack app kind on a second pooled connection while holding the transaction's, which can deadlock the pool at saturation (the new integration test is the first to reach that path)Type of Change
Testing
slack-shared-member-accounts.integration.ts, real Postgres): members on the shared app, then binding a leftover custom bot in another workspace is refused with no installation written (inserts one on the current code); binding a leftover shared-app bot in the members' workspace still succeedssetup.test.tsupdated for the moved helper; it still exercises the real rulecheck:audits, type-check, unit and integration suites run in CIChecklist
test-auditauthoring gate)