audit work, fixed StellaOps.sln warnings/errors, fixed tests, sprints work, new advisories
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Task: GOV-018 - Sealed mode overrides and risk profile events endpoints
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -119,7 +120,7 @@ public static class GovernanceEndpoints
|
||||
.Select(MapOverrideToResponse)
|
||||
.ToList(),
|
||||
VerificationStatus = "verified",
|
||||
LastVerifiedAt = timeProvider.GetUtcNow().ToString("O")
|
||||
LastVerifiedAt = timeProvider.GetUtcNow().ToString("O", CultureInfo.InvariantCulture)
|
||||
};
|
||||
|
||||
return Task.FromResult(Results.Ok(response));
|
||||
@@ -155,7 +156,7 @@ public static class GovernanceEndpoints
|
||||
state = new SealedModeState
|
||||
{
|
||||
IsSealed = true,
|
||||
SealedAt = now.ToString("O"),
|
||||
SealedAt = now.ToString("O", CultureInfo.InvariantCulture),
|
||||
SealedBy = actor,
|
||||
Reason = request.Reason,
|
||||
TrustRoots = request.TrustRoots ?? [],
|
||||
@@ -167,7 +168,7 @@ public static class GovernanceEndpoints
|
||||
state = new SealedModeState
|
||||
{
|
||||
IsSealed = false,
|
||||
LastUnsealedAt = now.ToString("O")
|
||||
LastUnsealedAt = now.ToString("O", CultureInfo.InvariantCulture)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -187,7 +188,7 @@ public static class GovernanceEndpoints
|
||||
AllowedSources = state.AllowedSources,
|
||||
Overrides = [],
|
||||
VerificationStatus = "verified",
|
||||
LastVerifiedAt = now.ToString("O")
|
||||
LastVerifiedAt = now.ToString("O", CultureInfo.InvariantCulture)
|
||||
};
|
||||
|
||||
return Task.FromResult(Results.Ok(response));
|
||||
@@ -212,8 +213,8 @@ public static class GovernanceEndpoints
|
||||
Reason = request.Reason,
|
||||
ApprovalId = $"approval-{Guid.NewGuid():N}",
|
||||
ApprovedBy = [actor],
|
||||
ExpiresAt = now.AddHours(request.DurationHours).ToString("O"),
|
||||
CreatedAt = now.ToString("O"),
|
||||
ExpiresAt = now.AddHours(request.DurationHours).ToString("O", CultureInfo.InvariantCulture),
|
||||
CreatedAt = now.ToString("O", CultureInfo.InvariantCulture),
|
||||
Active = true
|
||||
};
|
||||
|
||||
@@ -313,8 +314,8 @@ public static class GovernanceEndpoints
|
||||
Signals = request.Signals ?? [],
|
||||
SeverityOverrides = request.SeverityOverrides ?? [],
|
||||
ActionOverrides = request.ActionOverrides ?? [],
|
||||
CreatedAt = now.ToString("O"),
|
||||
ModifiedAt = now.ToString("O"),
|
||||
CreatedAt = now.ToString("O", CultureInfo.InvariantCulture),
|
||||
ModifiedAt = now.ToString("O", CultureInfo.InvariantCulture),
|
||||
CreatedBy = actor,
|
||||
ModifiedBy = actor
|
||||
};
|
||||
@@ -353,7 +354,7 @@ public static class GovernanceEndpoints
|
||||
Signals = request.Signals ?? existing.Signals,
|
||||
SeverityOverrides = request.SeverityOverrides ?? existing.SeverityOverrides,
|
||||
ActionOverrides = request.ActionOverrides ?? existing.ActionOverrides,
|
||||
ModifiedAt = now.ToString("O"),
|
||||
ModifiedAt = now.ToString("O", CultureInfo.InvariantCulture),
|
||||
ModifiedBy = actor
|
||||
};
|
||||
|
||||
@@ -409,7 +410,7 @@ public static class GovernanceEndpoints
|
||||
var entity = existing with
|
||||
{
|
||||
Status = "active",
|
||||
ModifiedAt = now.ToString("O"),
|
||||
ModifiedAt = now.ToString("O", CultureInfo.InvariantCulture),
|
||||
ModifiedBy = actor
|
||||
};
|
||||
|
||||
@@ -443,7 +444,7 @@ public static class GovernanceEndpoints
|
||||
var entity = existing with
|
||||
{
|
||||
Status = "deprecated",
|
||||
ModifiedAt = now.ToString("O"),
|
||||
ModifiedAt = now.ToString("O", CultureInfo.InvariantCulture),
|
||||
ModifiedBy = actor,
|
||||
DeprecationReason = request.Reason
|
||||
};
|
||||
@@ -551,7 +552,7 @@ public static class GovernanceEndpoints
|
||||
{
|
||||
if (RiskProfiles.IsEmpty)
|
||||
{
|
||||
var now = DateTimeOffset.UtcNow.ToString("O");
|
||||
var now = DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture);
|
||||
RiskProfiles["profile-default"] = new RiskProfileEntity
|
||||
{
|
||||
Id = "profile-default",
|
||||
@@ -599,7 +600,7 @@ public static class GovernanceEndpoints
|
||||
Id = id,
|
||||
TenantId = tenantId,
|
||||
Type = eventType,
|
||||
Timestamp = timeProvider.GetUtcNow().ToString("O"),
|
||||
Timestamp = timeProvider.GetUtcNow().ToString("O", CultureInfo.InvariantCulture),
|
||||
Actor = actor,
|
||||
ActorType = "user",
|
||||
TargetResource = targetId,
|
||||
|
||||
Reference in New Issue
Block a user