Skip to content

Harden Slack and Discord delivery against non-JSON failures and secret leakage #865

@VaibhavUpreti

Description

@VaibhavUpreti

Why This Matters

the Telegram path already redacts bot tokens and survives non-JSON failures; Slack and Discord should be equally safe.

Read First

  • app/utils/slack_delivery.py
  • app/utils/discord_delivery.py
  • app/utils/telegram_delivery.py

Scope

  1. Update Slack and Discord delivery code so resp.json() is never assumed to succeed.
  2. Make sure returned error strings and logs do not include raw access tokens or bot tokens.
  3. Follow the Telegram module's redaction behavior as the baseline.

Tests / Coverage

  • add tests for HTML/plain-text error bodies
  • add tests for exceptions containing tokens in the message
  • add tests that confirm the returned error strings are redacted

Acceptance Criteria

  • Slack and Discord helpers survive non-JSON failure bodies
  • tokens are redacted in logs and return values
  • no existing success-path behavior regresses

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomersreliabilityImproves stability and failure handlingsecuritySecurity hardening and sensitive-data safety

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions