Skip to content

Commit 1d3dac5

Browse files
Suppress various CodeQL items (#457)
Co-authored-by: sophiatev <[email protected]>
1 parent 2f83cc4 commit 1d3dac5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Client/AzureManaged/DurableTaskSchedulerClientOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ this.Credential is not null
173173
switch (authType.ToLowerInvariant())
174174
{
175175
case "defaultazure":
176-
return new DefaultAzureCredential();
176+
return new DefaultAzureCredential(); // CodeQL [SM05137] Use DefaultAzureCredential explicitly for local development and is decided by the user
177177
case "managedidentity":
178178
return new ManagedIdentityCredential(connectionString.ClientId);
179179
case "workloadidentity":

src/Worker/AzureManaged/DurableTaskSchedulerWorkerOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ this.Credential is not null
135135
switch (authType.ToLowerInvariant())
136136
{
137137
case "defaultazure":
138-
return new DefaultAzureCredential();
138+
return new DefaultAzureCredential(); // CodeQL [SM05137] Use DefaultAzureCredential explicitly for local development and is decided by the user
139139
case "managedidentity":
140140
return new ManagedIdentityCredential(connectionString.ClientId);
141141
case "workloadidentity":

src/Worker/Core/Shims/TaskOrchestrationContextWrapper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,9 @@ static void SwapByteArrayElements(byte[] byteArray, int left, int right)
379379

380380
byte[] hashByteArray;
381381
#pragma warning disable CA5350 // Do Not Use Weak Cryptographic Algorithms -- not for cryptography
382-
using (HashAlgorithm hashAlgorithm = SHA1.Create())
382+
using (HashAlgorithm hashAlgorithm = SHA1.Create()) /* CodeQL [SM02196] Suppressed: SHA1 is not used for cryptographic purposes here. The information being hashed is not sensitive,
383+
and the goal is to generate a deterministic Guid. We cannot update to SHA2-based algorithms without breaking
384+
customers' inflight orchestrations. */
383385
{
384386
hashAlgorithm.TransformBlock(namespaceValueByteArray, 0, namespaceValueByteArray.Length, null, 0);
385387
hashAlgorithm.TransformFinalBlock(nameByteArray, 0, nameByteArray.Length);

0 commit comments

Comments
 (0)