audit work, fixed StellaOps.sln warnings/errors, fixed tests, sprints work, new advisories

This commit is contained in:
master
2026-01-07 18:49:59 +02:00
parent 04ec098046
commit 608a7f85c0
866 changed files with 56323 additions and 6231 deletions

View File

@@ -17,7 +17,6 @@
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" />
<PackageReference Include="Moq" />
<PackageReference Include="xunit.v3" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Globalization;
using System.Text;
using System.Text.Json;
using System.Text.Json.Nodes;
@@ -970,7 +971,7 @@ app.MapPost("/api/v2/notify/deliveries/{deliveryId}/retry", async (
deliveryId,
retried = true,
newAttemptNumber,
scheduledAt = now.ToString("O"),
scheduledAt = now.ToString("O", CultureInfo.InvariantCulture),
message = "Delivery scheduled for retry"
});
});

View File

@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Globalization;
using System.Text;
using System.Text.Json;
using Microsoft.Extensions.Logging;
@@ -57,7 +58,7 @@ public sealed class CliChannelAdapter : INotifyChannelAdapter
textBody = rendered.TextBody,
format = rendered.Format.ToString(),
locale = rendered.Locale,
timestamp = DateTimeOffset.UtcNow.ToString("O"),
timestamp = DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture),
channelConfig = new
{
channelId = channel.ChannelId,

View File

@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Globalization;
using System.Net;
using System.Net.Http.Headers;
using System.Text;
@@ -294,7 +295,7 @@ public sealed class PagerDutyChannelAdapter : IChannelAdapter
Summary = summary,
Source = source,
Severity = severity,
Timestamp = context.Timestamp.ToString("O"),
Timestamp = context.Timestamp.ToString("O", CultureInfo.InvariantCulture),
Component = component,
Group = group,
Class = eventClass,

View File

@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Globalization;
using System.Net;
using System.Net.Http.Headers;
using System.Security.Cryptography;
@@ -230,7 +231,7 @@ public sealed class WebhookChannelAdapter : IChannelAdapter
request.Headers.UserAgent.Add(new ProductInfoHeaderValue("StellaOps-Notifier", "1.0"));
request.Headers.Add("X-StellaOps-Delivery-Id", context.DeliveryId);
request.Headers.Add("X-StellaOps-Trace-Id", context.TraceId);
request.Headers.Add("X-StellaOps-Timestamp", context.Timestamp.ToString("O"));
request.Headers.Add("X-StellaOps-Timestamp", context.Timestamp.ToString("O", CultureInfo.InvariantCulture));
if (_options.EnableHmacSigning && TryGetHmacSecret(context.Channel, out var secret))
{

View File

@@ -1,3 +1,4 @@
using System.Globalization;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@@ -288,8 +289,8 @@ public sealed class ChannelDigestDistributor : IDigestDistributor
["digestId"] = digest.DigestId,
["tenantId"] = digest.TenantId,
["scheduleName"] = schedule.Name,
["from"] = digest.From.ToString("O"),
["to"] = digest.To.ToString("O"),
["from"] = digest.From.ToString("O", CultureInfo.InvariantCulture),
["to"] = digest.To.ToString("O", CultureInfo.InvariantCulture),
["destination"] = channelConfig.Destination,
["channelType"] = channelConfig.Type
};

View File

@@ -1,3 +1,4 @@
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
@@ -69,7 +70,7 @@ public sealed partial class SimpleTemplateRenderer : INotifyTemplateRenderer
["eventId"] = notifyEvent.EventId.ToString(),
["kind"] = notifyEvent.Kind,
["tenant"] = notifyEvent.Tenant,
["timestamp"] = notifyEvent.Ts.ToString("O"),
["timestamp"] = notifyEvent.Ts.ToString("O", CultureInfo.InvariantCulture),
["actor"] = notifyEvent.Actor,
["version"] = notifyEvent.Version,
};

View File

@@ -1,3 +1,4 @@
using System.Globalization;
using System.Net;
using System.Net.Http.Json;
using System.Text;
@@ -179,7 +180,7 @@ public sealed class WebhookChannelDispatcher : INotifyChannelDispatcher
subject = content.Subject,
bodyHash = content.BodyHash,
format = content.Format.ToString(),
timestamp = DateTimeOffset.UtcNow.ToString("O")
timestamp = DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture)
});
}

View File

@@ -1,3 +1,4 @@
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
@@ -86,7 +87,7 @@ public sealed partial class EnhancedTemplateRenderer : INotifyTemplateRenderer
["eventId"] = notifyEvent.EventId.ToString(),
["kind"] = notifyEvent.Kind,
["tenant"] = notifyEvent.Tenant,
["timestamp"] = notifyEvent.Ts.ToString("O"),
["timestamp"] = notifyEvent.Ts.ToString("O", CultureInfo.InvariantCulture),
["actor"] = notifyEvent.Actor,
["version"] = notifyEvent.Version,
};

View File

@@ -1,3 +1,4 @@
using System.Globalization;
using System.Text.Json.Nodes;
namespace StellaOps.Notifier.Worker.Tenancy;
@@ -148,7 +149,7 @@ public sealed class DefaultTenantNotificationEnricher : ITenantNotificationEnric
if (_options.IncludeTimestamp)
{
tenantInfo["timestamp"] = _timeProvider.GetUtcNow().ToString("O");
tenantInfo["timestamp"] = _timeProvider.GetUtcNow().ToString("O", CultureInfo.InvariantCulture);
}
tenantInfo["source"] = context.Source.ToString();