security: bind SMS and Webhook adapters to 127.0.0.1 by default#4267
Closed
SHL0MS wants to merge 1 commit into
Closed
security: bind SMS and Webhook adapters to 127.0.0.1 by default#4267SHL0MS wants to merge 1 commit into
SHL0MS wants to merge 1 commit into
Conversation
Both adapters bound to 0.0.0.0, exposing their HTTP servers to the local network (and internet if port-forwarded). The API server adapter already correctly defaults to 127.0.0.1. - sms.py: configurable via SMS_WEBHOOK_HOST env var, defaults to 127.0.0.1 - webhook.py: DEFAULT_HOST changed from 0.0.0.0 to 127.0.0.1 Users who need network exposure can set SMS_WEBHOOK_HOST=0.0.0.0 or configure host in their webhook platform config. Closes NousResearch#4260
Contributor
|
Thanks for thinking about security here @SHL0MS, but we're going to pass on this one. Both the SMS and Webhook adapters are inbound webhook receivers — they exist to accept HTTP POSTs from external services (Twilio, GitHub, GitLab, Stripe, etc.). Binding to The API server correctly defaults to Users who run behind a reverse proxy and want localhost-only binding can already configure that through the webhook config's host setting. |
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.
Both adapters bound to 0.0.0.0, exposing HTTP servers to the local network. The API server adapter already correctly defaults to 127.0.0.1. SMS host now configurable via SMS_WEBHOOK_HOST env var. 3 lines changed. Closes #4260