Skip to content

Commit

Permalink
Weak cryptography suppression. (#10689)
Browse files Browse the repository at this point in the history
* Weak cryptography suppression.
  • Loading branch information
RohitRanjanMS authored Dec 20, 2024
1 parent 1f1305f commit cb0a62c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/WebJobs.Script/Description/DotNet/PackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ internal static string GetCurrentLockFileHash(string functionDirectory)
return string.Empty;
}

// CodeQL [SM02196] The hash here is used to create a unique identifier over non-sensitive data and there is no security impact. Changing the hashing algorithm of the file path hash would be a breaking change for applications.
using (var md5 = MD5.Create())
{
using (var stream = File.OpenRead(lockFilePath))
Expand Down
2 changes: 2 additions & 0 deletions src/WebJobs.Script/Host/ScriptHostIdProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ internal static HostIdResult GetDefaultHostId(IEnvironment environment, ScriptAp
if (!string.IsNullOrEmpty(uniqueSlotName))
{
byte[] hash;
// The Functions Host uses a Host ID to uniquely identify a particular Function App. By default, the ID is auto-generated from the Function App name, by taking the first 32 characters.
// CodeQL [SM02196] The hash here is used to create a unique identifier over non-sensitive data and there is no security impact. Changing the hashing algorithm of the host ID creation would be a breaking change for applications.
using (MD5 md5 = MD5.Create())
{
hash = md5.ComputeHash(Encoding.UTF8.GetBytes(uniqueSlotName));
Expand Down

0 comments on commit cb0a62c

Please sign in to comment.