diff --git a/src/ADOGenerator/Services/ProjectService.cs b/src/ADOGenerator/Services/ProjectService.cs index 526ea54..9f8901c 100644 --- a/src/ADOGenerator/Services/ProjectService.cs +++ b/src/ADOGenerator/Services/ProjectService.cs @@ -2870,6 +2870,7 @@ public static string SanitizeJson(string json) { jsonObject["password"] = "****"; } + // Add more sanitization logic as needed return jsonObject.ToString(); } } diff --git a/src/API/Service/ServiceEndPoint.cs b/src/API/Service/ServiceEndPoint.cs index 6bf620a..d8065fb 100644 --- a/src/API/Service/ServiceEndPoint.cs +++ b/src/API/Service/ServiceEndPoint.cs @@ -25,7 +25,8 @@ public ServiceEndpointModel CreateServiceEndPoint(string json, string project) using (var client = GetHttpClient()) { - var jsonContent = new StringContent(json, Encoding.UTF8, "application/json"); + var sanitizedJson = Utility.SanitizeJson(json); + var jsonContent = new StringContent(sanitizedJson, Encoding.UTF8, "application/json"); var method = new HttpMethod("POST"); var request = new HttpRequestMessage(method, project + "/_apis/distributedtask/serviceendpoints?api-version=" + _configuration.VersionNumber) { Content = jsonContent };