diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs index d64fd32bc5a..66a606a8d44 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs @@ -58,6 +58,7 @@ public SanitizerDictionary() { * */ private const string EMPTYGUID = "00000000-0000-0000-0000-000000000000"; + private const string BASE64ZERO = "MA=="; public List DefaultSanitizerList = new List { @@ -98,7 +99,7 @@ public SanitizerDictionary() { "ACS Identity leverages these strings to store identity information." ), new RegisteredSanitizer( - new GeneralRegexSanitizer(regex: "(?:[?&](sv|sig|se|srt|ss|sp)=)(?[^&\\\"\\s]*)", groupForReplace: "secret"), + new GeneralRegexSanitizer(regex: "(?:[?&](sig)=)(?[^&\\\"\\s]*)", groupForReplace: "secret"), "AZSDK1007", "Common SAS URL Sanitizer. Applies to all headers, URIs, and text bodies." ), @@ -243,15 +244,15 @@ public SanitizerDictionary() { "AZSDK3004" ), new RegisteredSanitizer( - new BodyRegexSanitizer(regex: "(?<=).*?(?:)(?.*)(?:)", groupForReplace: "group"), + new BodyRegexSanitizer(regex: "(?<=).*?(?:)(?.*)(?:)", groupForReplace: "group", value: BASE64ZERO), "AZSDK3005" ), new RegisteredSanitizer( - new BodyRegexSanitizer(regex: "(?<=).*?(?:)(?.*)(?:)", groupForReplace: "group"), + new BodyRegexSanitizer(regex: "(?<=).*?(?:)(?.*)(?:)", groupForReplace: "group", value: EMPTYGUID), "AZSDK3006" ), new RegisteredSanitizer( - new BodyRegexSanitizer(regex: "(?<=).*?(?:)(?.*)(?:)", groupForReplace: "group"), + new BodyRegexSanitizer(regex: "(?<=).*?(?:)(?.*)(?:)", groupForReplace: "group", value: EMPTYGUID), "AZSDK3007" ), new RegisteredSanitizer( @@ -660,6 +661,10 @@ public SanitizerDictionary() { new BodyKeySanitizer("$..resourceLocation"), "AZSDK3496" ), + new RegisteredSanitizer( + new BodyKeySanitizer("$..keyVaultClientId", value: EMPTYGUID), + "AZSDK3497" + ), #endregion #region UriRegex new RegisteredSanitizer(