Skip to content

Conversation

@nimish-ks
Copy link
Member

@nimish-ks nimish-ks commented Dec 26, 2025

🔍 Overview

This PR adds a network filtering until that restricts the targets to which you can set up an integration with on Phase Cloud. This is to provide an additional layer of protection against SSRF.

💡 Proposed Changes

  • Filter the following networks
# Additional blocked networks not covered by standard properties
# 100.64.0.0/10: Carrier Grade NAT (used by Tailscale, Alibaba Cloud metadata)
# 192.0.0.0/24: IETF Protocol Assignments
# 198.18.0.0/15: Network Benchmark
BLOCKED_NETWORKS = [
    ipaddress.ip_network("100.64.0.0/10"),
    ipaddress.ip_network("192.0.0.0/24"),
    ipaddress.ip_network("198.18.0.0/15"),
]

🖼️ Screenshots or Demo

Include before and after screenshots or animated GIFs/demo links to illustrate the changes visually. This is especially useful for UI/UX improvements.

📝 Release Notes

Summarize the changes in a user-friendly manner. Highlight new features, bug fixes, and any breaking changes, including migration steps or deprecated functionalities.

❓ Open Questions

If there are aspects of the changes that you're unsure about or would like feedback on, list them here.

🧪 Testing

Describe the testing strategy. List new tests added, existing tests modified, and any testing gaps.

🎯 Reviewer Focus

Guide the reviewer on where to start the review process. Suggest specific files, modules, or functionalities to focus on as entry points.

➕ Additional Context

Provide any additional information that might be helpful for reviewers and future contributors, such as links to related issues, discussions, or resources.

✨ How to Test the Changes Locally

Give clear instructions on how to test the changes locally, including setting up the environment, any necessary commands, or external dependencies.

💚 Did You...

  • Ensure linting passes (code style checks)?
  • Update dependencies and lockfiles (if required)
  • Update migrations (if required)
  • Regenerate graphql schema and types (if required)
  • Verify the app builds locally?
  • Manually test the changes on different browsers/devices?

…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.
@cursor
Copy link

cursor bot commented Dec 26, 2025

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.

@nimish-ks nimish-ks self-assigned this Dec 26, 2025
@nimish-ks nimish-ks marked this pull request as draft December 26, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants