-
Notifications
You must be signed in to change notification settings - Fork 56
feat: filter integration connections on Phase Cloud #712
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
Merged
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
…checks - Introduced `is_ip_private` function to determine if an IP address is private or belongs to blocked networks. - Added `validate_url_is_safe` function to validate URLs against private/internal IP addresses and raise validation errors if necessary. - Included additional blocked networks in the validation logic.
- Added a check to validate the Vault address URL for safety when the application host is set to "cloud". - Integrated the `validate_url_is_safe` function to ensure secure URL usage during authentication.
- Added a check to validate the API host URL when the application host is set to "cloud". - Integrated the `validate_url_is_safe` function to ensure secure URL usage during API host normalization.
- Added a check to validate the GitLab host URL when the application host is set to "cloud". - Integrated the `validate_url_is_safe` function to ensure secure URL usage during GitLab credential retrieval.
- Added a check to validate the Nomad address URL when the application host is set to "cloud". - Integrated the `validate_url_is_safe` function to ensure secure URL usage during Nomad token retrieval and secret synchronization.
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 13. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
…works in network utility
Signed-off-by: rohan <[email protected]>
rohan-chaturvedi
approved these changes
Jan 10, 2026
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.
🔍 Overview
This PR adds a network filtering utility that restricts the targets to which you can set up an integration on Phase Cloud. This provides a robust layer of protection against Server-Side Request Forgery (SSRF) by preventing the backend from making requests to internal, private, or reserved networks.
💡 Proposed Changes
backend/api/utils/network.pycontainingvalidate_url_is_safeandis_ip_private.BLOCKED_NETWORKSto filter out high-risk IP ranges:stsEndpointinCreateIdentityMutationandUpdateIdentityMutation.aws_iam_authview.VAULT_ADDR.NOMAD_ADDR.📝 Release Notes
🧪 Testing
127.0.0.1,169.254.169.254,192.168.1.1) as integration endpoints results in aValidationError.sts.amazonaws.com,gitlab.com) continue to work correctly.🎯 Reviewer Focus
backend/api/utils/network.py: Review thevalidate_url_is_safelogic and the list of blocked networks.➕ Additional Context
Finding reported by kolega.dev. (only for AWS STS endpoint)
✨ How to Test the Changes Locally
stsEndpointpointing tohttp://127.0.0.1:8000.vault_addrpointing to an internal IP (e.g.,http://10.0.0.5).URL resolves to a restricted IP address.💚 Did You...