-
Notifications
You must be signed in to change notification settings - Fork 17.4k
chore: strengthen SSRF proxy default configuration #24393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Will this new configuration block MCP server functionality where google.com is used to retrieve favicon? |
@DavideDelbianco Our goal is to block all access to the internal network environment by default-without blocking access to internet resources. Before this PR is merged, we encourage you to try the new configuration and report any issues you encounter. |
e09adc6
to
3e77099
Compare
9aff9d5
to
4036d03
Compare
- Block all private/internal networks by default to prevent SSRF attacks - Restrict allowed ports to only HTTP (80) and HTTPS (443) - Remove default domain allowlists (e.g., marketplace.dify.ai) - Implement deny-all-by-default policy with explicit whitelisting - Add example configuration files for common customization scenarios - Provide comprehensive documentation for security configuration Fixes #24392
- Block all private/internal networks by default to prevent SSRF attacks - Restrict ports to only HTTP (80) and HTTPS (443) - Deny all requests by default unless explicitly whitelisted - Add customization support via conf.d directory for local overrides - Provide example configurations for common use cases - Add CI/testing setup script to ensure tests pass with strict config - Update docker-compose files to support custom config mounting - Add comprehensive documentation with security warnings
Signed-off-by: -LAN- <[email protected]>
- Add marketplace.dify.ai to default allowed domains in squid.conf - Remove separate marketplace configuration example as it's no longer needed - Update documentation to reflect marketplace is allowed by default
- Rename example configs to maintain sequential numbering (10, 20, 30) - Update README to reflect new file numbering - Keep testing config as 00 since it's a special case
- Move docker/ssrf_proxy/conf.d/ ignore rule to root .gitignore - Remove redundant docker/ssrf_proxy/.gitignore file - Keep all gitignore rules in a single location for better maintainability
Signed-off-by: -LAN- <[email protected]>
Signed-off-by: -LAN- <[email protected]>
4036d03
to
b7c8724
Compare
Signed-off-by: -LAN- <[email protected]>
Summary
This PR implements a "secure by default" configuration for the SSRF proxy to address security vulnerability reports. The current configuration is too permissive, allowing access to internal networks and high port ranges that can be exploited for SSRF attacks.
Changes Made:
/etc/squid/conf.d/
configsSecurity Improvements:
User Impact:
Fixes #24392
Checklist
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods