From 4cb9ed6f3bb897210483f19e5bf94a023b78df2b Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 10 Aug 2026 19:18:46 +0800 Subject: [PATCH] fix(test): use resolvable URLs in MCP service update test UpdateMCPService now validates outbound URLs for SSRF; subdomains like before.example.com fail DNS resolution and break App CI. --- internal/application/service/mcp_service_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/application/service/mcp_service_test.go b/internal/application/service/mcp_service_test.go index 8f2d87b1..31be6fbb 100644 --- a/internal/application/service/mcp_service_test.go +++ b/internal/application/service/mcp_service_test.go @@ -183,11 +183,13 @@ func TestUpdateMCPService_AppliesNonScalarUpdateWithoutName(t *testing.T) { ctx := context.Background() svc, repo := newTestService() id := seedService(t, repo, "stored-api", "stored-token") - beforeURL := "https://before.example.com" + // Use resolvable example.com paths: subdomains like before.example.com fail + // SSRF DNS checks because they do not resolve to a public IP. + beforeURL := "https://example.com/before" repo.store[id].Description = "before" repo.store[id].URL = &beforeURL - afterURL := "https://after.example.com" + afterURL := "https://example.com/after" update := &types.MCPService{ ID: id, TenantID: 1,