Skip to content

Commit 792ebdd

Browse files
authored
Fix CodeQL warnings (#8663)
1 parent 01179ea commit 792ebdd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

eng/release/DiagnosticsReleaseTool/Common/AzureBlobPublisher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ private TokenCredential Credentials
4444
if (_clientId == null)
4545
{
4646
// Local development scenario. Use the default credential.
47-
return new DefaultAzureCredential();
47+
return new DefaultAzureCredential(); // CodeQL [SM05137] This is not a security issue as this is for local development only.
4848
}
4949

50-
return new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = _clientId });
50+
return new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = _clientId }); // CodeQL [SM05137] This is not a security issue since this is only used for pipeline builds.
5151
}
5252
}
5353

src/Extensions/AzureBlobStorage/AzureBlobEgressProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ private static TokenCredential CreateDefaultCredential(AzureBlobEgressProviderOp
394394
credOptions.ManagedIdentityClientId = options.ManagedIdentityClientId;
395395
}
396396

397-
return new DefaultAzureCredential(credOptions);
397+
return new DefaultAzureCredential(credOptions); // CodeQL [SM05137] Guidance here is to ensure that credential lookup is deterministic by using an environment variable. We accomplish this through settings and only including Managed Identity and Workload credentials, and do not want to introduce a breaking change.
398398
}
399399

400400
private static DefaultAzureCredentialOptions GetDefaultCredentialOptions() =>

0 commit comments

Comments
 (0)