From 755f1d696da308e850dd233292fb6e82cb0f1a07 Mon Sep 17 00:00:00 2001 From: Sidney Andrews Date: Thu, 19 Mar 2026 10:58:02 -0400 Subject: [PATCH] Potential fix for code scanning alert no. 1: Missing Dispose call on local IDisposable Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Sidney Andrews --- dotnet/001-connect-passwordless/connect.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/001-connect-passwordless/connect.cs b/dotnet/001-connect-passwordless/connect.cs index d71c2be..7e43621 100644 --- a/dotnet/001-connect-passwordless/connect.cs +++ b/dotnet/001-connect-passwordless/connect.cs @@ -12,7 +12,7 @@ ?? throw new InvalidOperationException("COSMOS_ENDPOINT is not configured. Run: dotnet user-secrets set --file connect.cs \"COSMOS_ENDPOINT\" \"\""); var credential = new DefaultAzureCredential(); -var client = new CosmosClient(endpoint, credential); +using var client = new CosmosClient(endpoint, credential); AccountProperties account = await client.ReadAccountAsync(); Console.WriteLine($"Account: {account.Id}");