Skip to content

fix: harden Discord webhook client - #14

Merged
we11adam merged 1 commit into
masterfrom
agent/fix-discord-webhook-security
Jul 26, 2026
Merged

fix: harden Discord webhook client#14
we11adam merged 1 commit into
masterfrom
agent/fix-discord-webhook-security

Conversation

@we11adam

Copy link
Copy Markdown
Owner

Summary

  • redact the complete Discord webhook URL from all notifier errors, covering URL-based configuration where the separate token field is empty
  • send a Discord-compliant User-Agent header
  • add regression coverage for webhook URL token leakage and the client header

Root cause and impact

When notifiers.discord.url was used, transport errors contained the request URL but redaction only knew about notifiers.discord.token. The resulting error was logged by the app and could expose the webhook credential. Resty also supplied its generic default user agent rather than the format required by Discord's HTTP API.

This change treats both token and webhook URL as sensitive on every Discord error path and configures the required client identity.

Validation

  • go test ./... (610 tests)
  • go vet ./...
  • go test -race ./notifier/discord

@we11adam
we11adam merged commit 1fed1b3 into master Jul 26, 2026
1 check passed
@we11adam
we11adam deleted the agent/fix-discord-webhook-security branch July 26, 2026 00:15
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