feat: Initialize Zastava Webhook service with TLS and Authority authentication
- Added Program.cs to set up the web application with Serilog for logging, health check endpoints, and a placeholder admission endpoint. - Configured Kestrel server to use TLS 1.3 and handle client certificates appropriately. - Created StellaOps.Zastava.Webhook.csproj with necessary dependencies including Serilog and Polly. - Documented tasks in TASKS.md for the Zastava Webhook project, outlining current work and exit criteria for each task.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace StellaOps.Scanner.Analyzers.OS;
|
||||
|
||||
public sealed class OSPackageAnalyzerResult
|
||||
{
|
||||
private static readonly IReadOnlyList<OSPackageRecord> EmptyPackages =
|
||||
new ReadOnlyCollection<OSPackageRecord>(Array.Empty<OSPackageRecord>());
|
||||
|
||||
private static readonly IReadOnlyList<AnalyzerWarning> EmptyWarnings =
|
||||
new ReadOnlyCollection<AnalyzerWarning>(Array.Empty<AnalyzerWarning>());
|
||||
|
||||
public OSPackageAnalyzerResult(
|
||||
string analyzerId,
|
||||
IEnumerable<OSPackageRecord>? packages,
|
||||
OSAnalyzerTelemetry telemetry,
|
||||
IEnumerable<AnalyzerWarning>? warnings = null)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(analyzerId);
|
||||
AnalyzerId = analyzerId.Trim();
|
||||
Packages = packages is null
|
||||
? EmptyPackages
|
||||
: new ReadOnlyCollection<OSPackageRecord>(packages.ToArray());
|
||||
Telemetry = telemetry;
|
||||
Warnings = warnings is null
|
||||
? EmptyWarnings
|
||||
: new ReadOnlyCollection<AnalyzerWarning>(warnings.ToArray());
|
||||
}
|
||||
|
||||
public string AnalyzerId { get; }
|
||||
|
||||
public IReadOnlyList<OSPackageRecord> Packages { get; }
|
||||
|
||||
public OSAnalyzerTelemetry Telemetry { get; }
|
||||
|
||||
public IReadOnlyList<AnalyzerWarning> Warnings { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user