audit, advisories and doctors/setup work

This commit is contained in:
master
2026-01-13 18:53:39 +02:00
parent 9ca7cb183e
commit d7be6ba34b
811 changed files with 54242 additions and 4056 deletions

View File

@@ -1,4 +1,5 @@
using System.Text.Json;
using StellaOps.Determinism;
namespace StellaOps.Scanner.Sources.Domain;
@@ -118,6 +119,7 @@ public sealed class SbomSource
JsonDocument configuration,
string createdBy,
TimeProvider timeProvider,
IGuidProvider guidProvider,
string? description = null,
string? authRef = null,
string? cronSchedule = null,
@@ -126,7 +128,7 @@ public sealed class SbomSource
var now = timeProvider.GetUtcNow();
var source = new SbomSource
{
SourceId = Guid.NewGuid(),
SourceId = guidProvider.NewGuid(),
TenantId = tenantId,
Name = name,
Description = description,

View File

@@ -1,3 +1,5 @@
using StellaOps.Determinism;
namespace StellaOps.Scanner.Sources.Domain;
#pragma warning disable CA1062 // Validate arguments of public methods - TimeProvider validated at DI boundary
@@ -40,7 +42,7 @@ public sealed class SbomSourceRun
if (CompletedAt.HasValue)
return (long)(CompletedAt.Value - StartedAt).TotalMilliseconds;
var now = timeProvider?.GetUtcNow() ?? DateTimeOffset.UtcNow;
var now = (timeProvider ?? TimeProvider.System).GetUtcNow();
return (long)(now - StartedAt).TotalMilliseconds;
}
@@ -84,11 +86,12 @@ public sealed class SbomSourceRun
SbomSourceRunTrigger trigger,
string correlationId,
TimeProvider timeProvider,
IGuidProvider guidProvider,
string? triggerDetails = null)
{
return new SbomSourceRun
{
RunId = Guid.NewGuid(),
RunId = guidProvider.NewGuid(),
SourceId = sourceId,
TenantId = tenantId,
Trigger = trigger,