Complete release compatibility and host inventory sprints

Signed-off-by: master <>
This commit is contained in:
master
2026-03-31 23:53:45 +03:00
parent b6bf113b99
commit f96c6cb9ed
33 changed files with 2322 additions and 362 deletions

View File

@@ -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()}";
}
}