Skip to content

feat: Add environment variable to bypass NoInternalIP rule for specific webhook hosts#1122

Merged
daveearley merged 4 commits intoHiEventsDev:developfrom
MineTech13:develop
Mar 25, 2026
Merged

feat: Add environment variable to bypass NoInternalIP rule for specific webhook hosts#1122
daveearley merged 4 commits intoHiEventsDev:developfrom
MineTech13:develop

Conversation

@MineTech13
Copy link
Copy Markdown
Contributor

Context & Problem:
The recent security enhancements introduced the NoInternalIP rule for webhooks. While this provides necessary security improvements, it limits deployments that intentionally route webhooks to internal services on the same network, such as self-hosted local bots.

Proposed Solution:
This PR adds a configuration option to explicitly whitelist specific internal hosts or IP addresses, allowing them to bypass the NoInternalIP restriction.

Changes Included:

  • Introduced a new environment variable (e.g., APP_ALLOWED_INTERNAL_WEBHOOK_HOSTS) that accepts a comma-separated list of hosts or IPs.
  • Updated the NoInternalIP validation rule to check against this variable. If a match is found, the restriction is skipped for that specific target.
  • The default security posture is preserved: if the environment variable is left unconfigured, the strict NoInternalIP rule applies to all internal addresses.

Testing:

  • Verified that external IPs process correctly.
  • Verified that internal IPs are blocked when the environment variable is absent.
  • Verified that internal IPs process correctly when explicitly added to the environment variable.

Checklist

  • I have read the contributing guidelines.
  • My code is of good quality and follows the coding standards of the project.
  • I have tested my changes, and they work as expected.

I have read the CLA Document and I hereby sign the CLA

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@MineTech13
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@novotnymiro
Copy link
Copy Markdown

Thanks @MineTech13, We are also facing this issue as this validation currently blocks our deployment. We are sending webhooks via internal network.

@daveearley
Copy link
Copy Markdown
Contributor

Thanks for this addition @MineTech13!

@daveearley daveearley merged commit 65e0e4e into HiEventsDev:develop Mar 25, 2026
4 of 5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants