fix(discord): re-check gateway authorization for interactive component clicks - #33896
Closed
Dusk1e wants to merge 1 commit into
Closed
fix(discord): re-check gateway authorization for interactive component clicks#33896Dusk1e wants to merge 1 commit into
Dusk1e wants to merge 1 commit into
Conversation
Collaborator
Contributor
|
Thanks for the security-focused contribution. This is an automated hermes-sweeper review; current
Closing as implemented on main. |
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
Enforces strict multi-tier gateway authorization re-checks over Discord interactive component views, preventing external boundary fail-open executions when Discord-specific platform allowlists are empty.
Why
A trust-boundary compliance failure existed inside the Discord platform adapter layer. While core slash commands complied with platform restrictions, interactive component views (such as buttons and selection dropdowns) bypassed runner-level policy verification pipelines whenever
DISCORD_ALLOWED_USERSorDISCORD_ALLOWED_ROLESparameters were unconfigured. An unauthorized workspace participant could intercept and click active UI elements to forcefully resolve high-risk command approvals, bypass confirmation guards, mutate active models, or answer confirmation dialogs. This patch binds component click lifecycles directly to core runner verification layers.Applied Authorization Precedence
DISCORD_ALLOWED_USERSorDISCORD_ALLOWED_ROLES).fail-closedcancellation if all tracking parameters evaluate as empty or unmatched.Scope of Changes
Affected Views
ExecApprovalViewSlashConfirmViewUpdatePromptViewModelPickerViewClarifyChoiceViewVerified Test Suites
All targeted interaction checks, authorization loops, and linter constraints completed with absolute success:
tests/gateway/test_discord_component_auth.pytests/gateway/test_discord_bot_auth_bypass.pytests/gateway/test_discord_clarify_buttons.pytests/gateway/test_discord_model_picker.pytests/gateway/test_discord_lazy_install_views.pytests/gateway/test_discord_slash_auth.py