Remove legacy AttackTracer repo content
Some checks failed
OfficeCom Sentinel Client / build-client (push) Has been cancelled
Some checks failed
OfficeCom Sentinel Client / build-client (push) Has been cancelled
This commit is contained in:
34
src/OCSentinelCli/Configuration/ClientConfiguration.cs
Normal file
34
src/OCSentinelCli/Configuration/ClientConfiguration.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace OCSentinelCli.Configuration;
|
||||
|
||||
internal sealed record ClientConfiguration
|
||||
{
|
||||
public string SchemaVersion { get; init; } = "2.0";
|
||||
|
||||
public string Environment { get; init; } = "production";
|
||||
|
||||
public int LookbackDays { get; init; } = 7;
|
||||
|
||||
public int TopFindings { get; init; } = 10;
|
||||
|
||||
public string N8nWebhookUrl { get; init; } = string.Empty;
|
||||
|
||||
public string DeviceIdentifierMode { get; init; } = "machineName";
|
||||
|
||||
public int UploadTimeoutSeconds { get; init; } = 30;
|
||||
|
||||
public bool EnableVulnerabilityCorrelation { get; init; } = true;
|
||||
|
||||
public string VulnerabilityCsvPath { get; init; } = string.Empty;
|
||||
|
||||
public string SecretReference { get; init; } = "device-default";
|
||||
|
||||
public static ClientConfiguration Load(string path)
|
||||
{
|
||||
string fullPath = Path.GetFullPath(path);
|
||||
string json = File.ReadAllText(fullPath);
|
||||
ClientConfiguration? config = JsonSerializer.Deserialize<ClientConfiguration>(json, JsonOptions.Default);
|
||||
return config ?? new ClientConfiguration();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user