Conversation
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.
Summary
Add configurable SSRF allowlists for trusted internal integrations while preserving strict protection for user-, model-, and provider-derived URLs.
The implementation centralizes outbound policy construction, validates all DNS results before dialing, preserves the same policy across redirects, and permanently blocks metadata, link-local, multicast, and unspecified targets.
Fix: #556
Change type
Affected areas
Verification
go test ./...pnpm --filter @deeix/api checkpnpm --filter @deeix/api buildpnpm verifygit diff --checkScreenshots, API examples, or logs
Not applicable. This change has no frontend UI changes or public API schema changes.
Configuration, migration, and compatibility notes
Added:
SSRF_ALLOWED_HOSTS: exact trusted hostnames or container names, comma-separated.SSRF_ALLOWED_CIDRS: trusted IP ranges in CIDR notation, comma-separated.The settings are independent and default to empty. No database migration is required. Configuration changes require a backend restart.
Trusted integration endpoints may use the configured allowlist. Media downloads, provider-generated URLs, and public catalog downloads continue using the strict outbound policy.
No secrets, credentials, or personal data are included.
Documentation
README files, configuration examples, backend security rules, layering rules, SDK references, checklists, and the backend feature template were updated.
Note:
docs/rules/backend/*is currently excluded by.gitignore; those local rule files were updated but are not included in the Git diff unless the ignore policy is intentionally changed.Security and privacy
Checklist
.pycfiles,.envfiles, and local storage data are not committed.