Problem
Scheduled report delivery can block indefinitely when a webhook endpoint accepts the TCP connection but never sends a response.
Current Behavior
internal/scheduler/scheduler.go sends webhook reports with the package-level http.Post helper:
resp, err := http.Post(webhookURL, "application/json", bytes.NewBuffer(jsonData))
http.Post uses http.DefaultClient, which has no timeout. If the destination webhook stalls, the scheduled job goroutine can remain stuck forever and the scheduler cannot reliably finish, retry, or record the failed report delivery.
Why This Matters
This affects automated reporting reliability. A slow or malicious webhook receiver can pin a scheduled report job indefinitely, which is especially risky for daemon/scheduled usage where the user expects jobs to complete or fail within a bounded time.
Reproduction Evidence
- Configure a scheduled job with a webhook destination.
- Point the webhook URL to an endpoint that accepts the request and sleeps without responding.
- Run the scheduled export path.
- The call to
sendToWebhook waits without a bounded deadline because the client has no timeout.
Proposed Solution
Use an HTTP client with an explicit timeout for webhook delivery and add a focused scheduler test that proves stalled webhooks return a timeout error instead of hanging.
Expected Outcome
Webhook report delivery should fail fast with a clear error when the receiver stalls, allowing the scheduled job to complete its failure path instead of blocking forever.
Duplicate Check
Checked existing issues/PRs for scheduled report webhook hangs, http.Post timeout, scheduled report webhook timeout http.Post, and webhook blocks scheduler. No matching open issue or PR was found.
Problem
Scheduled report delivery can block indefinitely when a webhook endpoint accepts the TCP connection but never sends a response.
Current Behavior
internal/scheduler/scheduler.gosends webhook reports with the package-levelhttp.Posthelper:http.Postuseshttp.DefaultClient, which has no timeout. If the destination webhook stalls, the scheduled job goroutine can remain stuck forever and the scheduler cannot reliably finish, retry, or record the failed report delivery.Why This Matters
This affects automated reporting reliability. A slow or malicious webhook receiver can pin a scheduled report job indefinitely, which is especially risky for daemon/scheduled usage where the user expects jobs to complete or fail within a bounded time.
Reproduction Evidence
sendToWebhookwaits without a bounded deadline because the client has no timeout.Proposed Solution
Use an HTTP client with an explicit timeout for webhook delivery and add a focused scheduler test that proves stalled webhooks return a timeout error instead of hanging.
Expected Outcome
Webhook report delivery should fail fast with a clear error when the receiver stalls, allowing the scheduled job to complete its failure path instead of blocking forever.
Duplicate Check
Checked existing issues/PRs for
scheduled report webhook hangs,http.Post timeout,scheduled report webhook timeout http.Post, andwebhook blocks scheduler. No matching open issue or PR was found.