Debug logging writes the Slack, Mattermost and ntfy webhook URLs to the log on every delivery #288

Open
opened 2026-10-13 22:55:41 +02:00 by clawbot · 0 comments
Collaborator

What is wrong. With DNSWATCHER_DEBUG=true, every delivery logs the full endpoint URL. A Slack or Mattermost incoming webhook URL is the credential that lets anyone who has it post to the channel, and an ntfy topic URL lets anyone read and post the topic. The log goes to stdout, so to the Docker log and to whatever collects it.

Where (at v1.0.0-rc1): internal/notify/notify.go lines 310-314 (sending ntfy notification, key topic) and lines 389-393 (sending webhook notification, key url).

Scenario. An operator sets DNSWATCHER_DEBUG=true to look into a DNS problem. From then on each notification writes the Slack webhook URL, the Mattermost webhook URL and the ntfy topic URL to the log, once per endpoint; the log is shipped to a central store, kept by Docker, or pasted into an issue. Confirmed by reading.

Correct. README, Web Dashboard: "The dashboard intentionally does not expose any configuration details such as webhook URLs, notification endpoints, or API tokens"; CODE_STYLEGUIDE.md: secrets live in environment variables and are never written anywhere else. The log names the endpoint (slack, mattermost, ntfy), as the retry and failure lines already do, and never the path or query of its URL.

Done when: no log line at any level carries a webhook URL's path or query; the two debug lines name the endpoint and the title only; a notify test asserts the webhook path is absent from the debug log output.

Severity: minor

Model: fable-5-1

**What is wrong.** With `DNSWATCHER_DEBUG=true`, every delivery logs the full endpoint URL. A Slack or Mattermost incoming webhook URL is the credential that lets anyone who has it post to the channel, and an ntfy topic URL lets anyone read and post the topic. The log goes to stdout, so to the Docker log and to whatever collects it. **Where** (at `v1.0.0-rc1`): `internal/notify/notify.go` lines 310-314 (`sending ntfy notification`, key `topic`) and lines 389-393 (`sending webhook notification`, key `url`). **Scenario.** An operator sets `DNSWATCHER_DEBUG=true` to look into a DNS problem. From then on each notification writes the Slack webhook URL, the Mattermost webhook URL and the ntfy topic URL to the log, once per endpoint; the log is shipped to a central store, kept by Docker, or pasted into an issue. Confirmed by reading. **Correct.** README, Web Dashboard: "The dashboard intentionally does not expose any configuration details such as webhook URLs, notification endpoints, or API tokens"; CODE_STYLEGUIDE.md: secrets live in environment variables and are never written anywhere else. The log names the endpoint (`slack`, `mattermost`, `ntfy`), as the retry and failure lines already do, and never the path or query of its URL. **Done when:** no log line at any level carries a webhook URL's path or query; the two debug lines name the endpoint and the title only; a notify test asserts the webhook path is absent from the debug log output. Severity: minor Model: fable-5-1
clawbot self-assigned this 2026-10-13 22:55:41 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#288