Complete release compatibility and host inventory sprints
Signed-off-by: master <>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using StellaOps.Scanner.WebService.Security;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace StellaOps.Scanner.WebService.Endpoints;
|
||||
|
||||
@@ -90,7 +92,7 @@ internal static class RegistryEndpoints
|
||||
new RegistryDigestEntry
|
||||
{
|
||||
Tag = "latest",
|
||||
Digest = $"sha256:{Guid.NewGuid():N}",
|
||||
Digest = CreateDeterministicDigest(repository),
|
||||
PushedAt = "2026-03-20T10:00:00Z"
|
||||
}
|
||||
}
|
||||
@@ -256,4 +258,10 @@ internal static class RegistryEndpoints
|
||||
LastPushed = "2026-03-20T15:00:00Z"
|
||||
},
|
||||
};
|
||||
|
||||
private static string CreateDeterministicDigest(string repository)
|
||||
{
|
||||
var hash = SHA256.HashData(Encoding.UTF8.GetBytes(repository.Trim().ToLowerInvariant()));
|
||||
return $"sha256:{Convert.ToHexString(hash).ToLowerInvariant()}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user