Open
Conversation
59c1e2c to
bc3ea93
Compare
bc3ea93 to
ff3e172
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds centralized endpoint/URL validation to reduce SSRF risk across several tools by introducing a shared EndpointValidator helper and applying it at key call sites.
Changes:
- Introduces
EndpointValidatorhelper with validation for Azure service endpoints, allowed external hosts, and public target URLs. - Integrates endpoint validation into Fabric PublicApi network resource download, and Azure tools (LoadTesting, Communication, AppConfig, ACR).
- Adds unit tests for the new validator behaviors.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Fabric.Mcp.Tools.PublicApi/src/Services/NetworkResourceProviderService.cs | Validates GitHub download URLs against an allowlist before fetching. |
| tools/Azure.Mcp.Tools.LoadTesting/src/Services/LoadTestingService.cs | Validates endpointUrl for load-test targets. |
| tools/Azure.Mcp.Tools.Communication/src/Services/CommunicationService.cs | Validates Communication Service endpoint domain/scheme before client creation. |
| tools/Azure.Mcp.Tools.AppConfig/src/Services/AppConfigService.cs | Validates App Configuration endpoint before client creation. |
| tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs | Validates ACR login server endpoint before data-plane calls. |
| core/Microsoft.Mcp.Core/src/Helpers/EndpointValidator.cs | New shared validator implementation (Azure endpoints, external allowlist URLs, public target URL checks). |
| core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Helpers/EndpointValidatorTests.cs | New unit tests for validator behavior and edge cases. |
tools/Azure.Mcp.Tools.LoadTesting/src/Services/LoadTestingService.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Communication/src/Services/CommunicationService.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.AppConfig/src/Services/AppConfigService.cs
Outdated
Show resolved
Hide resolved
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.
No description provided.