Details
Remediation
Recommended fixes:
- For Discord, require approvals to be tied to the request, not merely any later channel message. Use Discord interactions/buttons with opaque server-side request ids, or require a Discord reply whose
message_reference.message_idmatches the approval message. - Add explicit approver identity configuration to all messaging approval backends, for example
approver_user_idsorallowed_approvers. - Reject approvals from users outside the configured approver set, even if the message appears in the configured channel.
- Include a per-request nonce or opaque approval id in callbacks and verify it server side before returning
ApprovalDecision(approved=True). - Add regression tests for Discord where:
- an unrelated later
yesin the channel is ignored; - a reply from a non-approver is ignored;
- a request-bound reply/callback from an allowed approver succeeds.