feat(webhooks): ALLOW_PRIVATE_NETWORK_TARGETS env to allow internal targets#1579
Merged
mattwoberts merged 3 commits intoJun 24, 2026
Merged
Conversation
Self-hosted Fider instances frequently need webhook targets on the same LAN (Plane, n8n, internal Slack bridges, etc.). Upstream's SSRF guard in WebhookURL() rejects every RFC1918 / loopback / link-local target with no override, which makes Fider unusable for internal-only deployments that depend on webhook integrations. This commit adds an opt-in env var WEBHOOK_ALLOW_PRIVATE_IPS (default false) that, when set, skips the private-network check. Format validation (well-formed URL, http/https scheme) still runs. Tests cover: the new env keeps existing blocked addresses blocked when unset (no behavior change for hosted Fider); when enabled, RFC1918, loopback, link-local, and "localhost" all pass validation; opting in still rejects non-http schemes and malformed URLs.
Contributor
|
Should be an issue really, but I'll let you off |
The validate.WebhookURL SSRF guard is shared: besides webhooks it also validates OAuth token/profile URLs. The previous WEBHOOK_ALLOW_PRIVATE_IPS name implied a webhook-only scope and understated that enabling it also relaxes SSRF protection for OAuth provider config. Rename the env var (and Go field) to ALLOW_PRIVATE_NETWORK_TARGETS, document it in .example.env with an SSRF note, and clarify the WebhookURL doc comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Thanks @hodyhq , I'll bring this in now 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self-hosted Fider instances frequently need webhook targets on the same LAN (Plane, n8n, internal Slack bridges, etc.). Upstream's SSRF guard in WebhookURL() rejects every RFC1918 / loopback / link-local target with no override, which makes Fider unusable for internal-only deployments that depend on webhook integrations.
This commit adds an opt-in env var WEBHOOK_ALLOW_PRIVATE_IPS (default false) that, when set, skips the private-network check. Format validation (well-formed URL, http/https scheme) still runs.
Tests cover: the new env keeps existing blocked addresses blocked when unset (no behavior change for hosted Fider); when enabled, RFC1918, loopback, link-local, and "localhost" all pass validation; opting in still rejects non-http schemes and malformed URLs.
Issue: