Skip to content

Commit

Permalink
No longer log the subscription identifier for security reasons (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell authored Mar 11, 2024
1 parent 3eabb2d commit 1ca9ed0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"azuredevops",
"Keyspaces",
"Kubernetes",
"vsts"
"vsts",
"xunit"
]
}
4 changes: 2 additions & 2 deletions Tingle.AzureCleaner/AzureCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ protected virtual async Task DeleteAzureResourcesAsync(IReadOnlyCollection<strin
&& !subscriptionIdsOrNames.Contains(sub.Data.SubscriptionId, StringComparer.OrdinalIgnoreCase)
&& !subscriptionIdsOrNames.Contains(sub.Data.DisplayName, StringComparer.OrdinalIgnoreCase))
{
logger.LogDebug("Skipping subscription '{SubscriptionName} ({SubscriptionId})' ...", sub.Data.DisplayName, sub.Data.SubscriptionId);
logger.LogDebug("Skipping subscription '{SubscriptionName}' ...", sub.Data.DisplayName); // no subscription ID for security reasons
continue;
}

logger.LogDebug("Searching in subscription '{SubscriptionName} ({SubscriptionId})' ...", sub.Data.DisplayName, sub.Data.SubscriptionId);
logger.LogDebug("Searching in subscription '{SubscriptionName}' ...", sub.Data.DisplayName); // no subscription ID for security reasons

// resource group is deleted first to avoid repetition on dependent resources, it makes it easier
if (options.AzureResourceGroups)
Expand Down

0 comments on commit 1ca9ed0

Please sign in to comment.