Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppressing CodeQL.SM02196 #3876

Open
wants to merge 2 commits into
base: v4.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Azure.Functions.Cli/Helpers/SecurityHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ internal static async Task<X509Certificate2> CreateCertificateOpenSSL()
return new X509Certificate2($"{certFileNames}certificate.pfx", DEFAULT_PASSWORD);
}

// Suppressing CodeQL warning because this code is only used to validate blob content. Not used to encrypt any secrets
// blobClient only provides md5 string for validation. We cannot replace that unless they provide something else for validation
// TODO: Find out if
#pragma warning disable CodeQL.SM02196
soninaren marked this conversation as resolved.
Show resolved Hide resolved
public static string CalculateMd5(Stream stream)
{
using (var md5 = MD5.Create())
Expand All @@ -131,6 +135,8 @@ public static string CalculateMd5(Stream stream)
return base64String;
}
}
#pragma warning restore CodeQL.SM02196


public static string CalculateMd5(string file)
{
Expand Down
Loading