Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Add URL validation for non-gateway MCP servers in createMcpServer
Saif25dcf57ae779
diff --git a/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.ts b/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.tsindex c778e36998..b88fb4dd8c 100644--- a/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.ts+++ b/backend/src/ee/services/ai-mcp-server/ai-mcp-server-service.ts@@ -787,6 +787,11 @@ export const aiMcpServerServiceFactory = ({);}+ const urlObj = new URL(url);+ if (!gatewayId) {+ await verifyHostInputValidity({ host: urlObj.hostname, isGateway: false, isDynamicSecret: false });+ }+const encryptedCredentials = await encryptCredentials({projectId,credentials,