Skip to content

Commit

Permalink
Add common secret patterns. (Azure#26871)
Browse files Browse the repository at this point in the history
  • Loading branch information
vidai-msft authored Dec 16, 2024
1 parent 21d2c2b commit b80e893
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tools/TestFx/Recorder/RecorderUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,32 @@ public static class RecorderUtilities

static RecorderUtilities()
{
JsonPathSanitizers.Add("$..Password");
JsonPathSanitizers.Add("$..password");
JsonPathSanitizers.Add("$..adminPassword");
JsonPathSanitizers.Add("$..passwords[*].value");
JsonPathSanitizers.Add("$..secret");
JsonPathSanitizers.Add("$..secretText");
JsonPathSanitizers.Add("$..accessSAS");
JsonPathSanitizers.Add("$..storageAccountKey");
JsonPathSanitizers.Add("$..primaryKey");
JsonPathSanitizers.Add("$..primaryMasterKey");
JsonPathSanitizers.Add("$..primaryReadonlyMasterKey");
JsonPathSanitizers.Add("$..secondaryKey");
JsonPathSanitizers.Add("$..secondaryMasterKey");
JsonPathSanitizers.Add("$..secondaryReadonlyMasterKey");
JsonPathSanitizers.Add("$..keys[*].value");
JsonPathSanitizers.Add("$..connectionString");
JsonPathSanitizers.Add("$..primaryConnectionString");
JsonPathSanitizers.Add("$..secondaryConnectionString");
JsonPathSanitizers.Add("$..connectionString");
JsonPathSanitizers.Add("$..aliasPrimaryConnectionString");
JsonPathSanitizers.Add("$..aliasSecondaryConnectionString");
JsonPathSanitizers.Add("$..administratorLoginPassword");
JsonPathSanitizers.Add("$..hubDatabasePassword");
JsonPathSanitizers.Add("$.properties.siteConfig.machineKey.decryptionKey");
JsonPathSanitizers.Add("$.properties.WEBSITE_AUTH_ENCRYPTION_KEY");
JsonPathSanitizers.Add("$.properties.DOCKER_REGISTRY_SERVER_PASSWORD");
JsonPathSanitizers.Add("$.properties.protectedSettings.storageAccountKey");
}

public static bool IsHttpContentBinary(HttpContent content)
Expand Down

0 comments on commit b80e893

Please sign in to comment.