Restructure solution layout by module
This commit is contained in:
99
src/RiskEngine/StellaOps.RiskEngine.sln
Normal file
99
src/RiskEngine/StellaOps.RiskEngine.sln
Normal file
@@ -0,0 +1,99 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StellaOps.RiskEngine", "StellaOps.RiskEngine", "{E9DC9A4E-8D1E-15F0-822A-EE12A198E114}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Core", "StellaOps.RiskEngine\StellaOps.RiskEngine.Core\StellaOps.RiskEngine.Core.csproj", "{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Infrastructure", "StellaOps.RiskEngine\StellaOps.RiskEngine.Infrastructure\StellaOps.RiskEngine.Infrastructure.csproj", "{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Tests", "StellaOps.RiskEngine\StellaOps.RiskEngine.Tests\StellaOps.RiskEngine.Tests.csproj", "{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.WebService", "StellaOps.RiskEngine\StellaOps.RiskEngine.WebService\StellaOps.RiskEngine.WebService.csproj", "{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Worker", "StellaOps.RiskEngine\StellaOps.RiskEngine.Worker\StellaOps.RiskEngine.Worker.csproj", "{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Release|x64.Build.0 = Release|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4}.Release|x86.Build.0 = Release|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Release|x64.Build.0 = Release|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81}.Release|x86.Build.0 = Release|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF}.Release|x86.Build.0 = Release|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{36C6C658-51E2-4D1C-9C2D-723A6015B0A4} = {E9DC9A4E-8D1E-15F0-822A-EE12A198E114}
|
||||
{BBFBBF30-8AC3-45A9-8EC7-35A0B3F50F81} = {E9DC9A4E-8D1E-15F0-822A-EE12A198E114}
|
||||
{015C24AC-3CCD-4FE7-BAD6-4A3728D4978A} = {E9DC9A4E-8D1E-15F0-822A-EE12A198E114}
|
||||
{5B3CBF2B-B913-4A40-8D78-12F68A6828EF} = {E9DC9A4E-8D1E-15F0-822A-EE12A198E114}
|
||||
{55F4423C-FDAD-43D4-9A91-EB217EB1BE2B} = {E9DC9A4E-8D1E-15F0-822A-EE12A198E114}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
23
src/RiskEngine/StellaOps.RiskEngine/AGENTS.md
Normal file
23
src/RiskEngine/StellaOps.RiskEngine/AGENTS.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Risk Engine Guild Charter
|
||||
|
||||
## Mission
|
||||
Design, build, and operate the scoring runtime that computes Risk Scoring Profiles across StellaOps deployments while preserving provenance and explainability.
|
||||
|
||||
## Scope
|
||||
- Scoring workers, job scheduler, provider registry, caching, and explainability artifacts.
|
||||
- Integration with Findings Ledger, Conseiller, Excitator, and Policy Engine.
|
||||
- Performance, determinism, and observability of scoring jobs.
|
||||
- Air-gapped support through offline factor bundles.
|
||||
|
||||
## Definition of Done
|
||||
- Scoring jobs execute deterministically with audit trails and explainability payloads.
|
||||
- Providers registered with TTLs and health checks; missing data surfaced explicitly.
|
||||
- Benchmarks and SLO dashboards in place with incident response runbooks.
|
||||
|
||||
## Module Layout
|
||||
- `StellaOps.RiskEngine.Core/` — scoring orchestrators, provider contracts, explainability models.
|
||||
- `StellaOps.RiskEngine.Infrastructure/` — persistence, caching, provider loading, external data connectors.
|
||||
- `StellaOps.RiskEngine.WebService/` — APIs for jobs, results, explanations.
|
||||
- `StellaOps.RiskEngine.Worker/` — execution loops, provider refreshers, scoring pipelines.
|
||||
- `StellaOps.RiskEngine.Tests/` — unit tests for core/infrastructure services.
|
||||
- `StellaOps.RiskEngine.sln` — solution unifying module projects.
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace StellaOps.RiskEngine.Core;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace StellaOps.RiskEngine.Infrastructure;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
<ProjectReference Include="..\StellaOps.RiskEngine.Core\StellaOps.RiskEngine.Core.csproj"/>
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
<OutputType>Exe</OutputType>
|
||||
|
||||
|
||||
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
|
||||
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
|
||||
<UseConcelierTestInfra>false</UseConcelierTestInfra>
|
||||
|
||||
|
||||
<LangVersion>preview</LangVersion>
|
||||
|
||||
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<PackageReference Include="xunit.v3" Version="3.0.0"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.3"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
<Using Include="Xunit"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
<ProjectReference Include="..\StellaOps.RiskEngine.Core\StellaOps.RiskEngine.Core.csproj"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<ProjectReference Include="..\StellaOps.RiskEngine.Infrastructure\StellaOps.RiskEngine.Infrastructure.csproj"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace StellaOps.RiskEngine.Tests;
|
||||
|
||||
public class UnitTest1
|
||||
{
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json"
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||
builder.Services.AddOpenApi();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.MapOpenApi();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
var summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
app.MapGet("/weatherforecast", () =>
|
||||
{
|
||||
var forecast = Enumerable.Range(1, 5).Select(index =>
|
||||
new WeatherForecast
|
||||
(
|
||||
DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
|
||||
Random.Shared.Next(-20, 55),
|
||||
summaries[Random.Shared.Next(summaries.Length)]
|
||||
))
|
||||
.ToArray();
|
||||
return forecast;
|
||||
})
|
||||
.WithName("GetWeatherForecast");
|
||||
|
||||
app.Run();
|
||||
|
||||
record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
|
||||
{
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"applicationUrl": "http://localhost:5115",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"applicationUrl": "https://localhost:7103;http://localhost:5115",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0-rc.2.25502.107"/>
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
<ProjectReference Include="..\StellaOps.RiskEngine.Core\StellaOps.RiskEngine.Core.csproj"/>
|
||||
|
||||
|
||||
<ProjectReference Include="..\StellaOps.RiskEngine.Infrastructure\StellaOps.RiskEngine.Infrastructure.csproj"/>
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
@StellaOps.RiskEngine.WebService_HostAddress = http://localhost:5115
|
||||
|
||||
GET {{StellaOps.RiskEngine.WebService_HostAddress}}/weatherforecast/
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
using StellaOps.RiskEngine.Worker;
|
||||
|
||||
var builder = Host.CreateApplicationBuilder(args);
|
||||
builder.Services.AddHostedService<Worker>();
|
||||
|
||||
var host = builder.Build();
|
||||
host.Run();
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"StellaOps.RiskEngine.Worker": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"environmentVariables": {
|
||||
"DOTNET_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" ?>
|
||||
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
||||
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
|
||||
<UserSecretsId>dotnet-StellaOps.RiskEngine.Worker-b973483d-c33b-47fb-a20f-e2669c244427</UserSecretsId>
|
||||
|
||||
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0-rc.2.25502.107"/>
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
<ProjectReference Include="..\StellaOps.RiskEngine.Core\StellaOps.RiskEngine.Core.csproj"/>
|
||||
|
||||
|
||||
<ProjectReference Include="..\StellaOps.RiskEngine.Infrastructure\StellaOps.RiskEngine.Infrastructure.csproj"/>
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace StellaOps.RiskEngine.Worker;
|
||||
|
||||
public class Worker(ILogger<Worker> logger) : BackgroundService
|
||||
{
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
if (logger.IsEnabled(LogLevel.Information))
|
||||
{
|
||||
logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
|
||||
}
|
||||
await Task.Delay(1000, stoppingToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
90
src/RiskEngine/StellaOps.RiskEngine/StellaOps.RiskEngine.sln
Normal file
90
src/RiskEngine/StellaOps.RiskEngine/StellaOps.RiskEngine.sln
Normal file
@@ -0,0 +1,90 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Core", "StellaOps.RiskEngine.Core\StellaOps.RiskEngine.Core.csproj", "{C570DE3F-3510-40EA-ADEF-40852E3B29DC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Infrastructure", "StellaOps.RiskEngine.Infrastructure\StellaOps.RiskEngine.Infrastructure.csproj", "{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.WebService", "StellaOps.RiskEngine.WebService\StellaOps.RiskEngine.WebService.csproj", "{602F3394-15B6-4349-90CE-8E07F5BE58EB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Worker", "StellaOps.RiskEngine.Worker\StellaOps.RiskEngine.Worker.csproj", "{B05B5581-B31D-4C49-931C-707A9206E12C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StellaOps.RiskEngine.Tests", "StellaOps.RiskEngine.Tests\StellaOps.RiskEngine.Tests.csproj", "{FE873E24-9A06-414D-BD25-7A7658D11F22}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Release|x64.Build.0 = Release|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C570DE3F-3510-40EA-ADEF-40852E3B29DC}.Release|x86.Build.0 = Release|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7686E310-A4CF-40AD-B6D3-F875AC7AF19F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Release|x64.Build.0 = Release|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{602F3394-15B6-4349-90CE-8E07F5BE58EB}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B05B5581-B31D-4C49-931C-707A9206E12C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FE873E24-9A06-414D-BD25-7A7658D11F22}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
32
src/RiskEngine/StellaOps.RiskEngine/TASKS.md
Normal file
32
src/RiskEngine/StellaOps.RiskEngine/TASKS.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Risk Engine Task Board — Epic 18: Risk Scoring Profiles
|
||||
|
||||
## Sprint 66 – Foundations
|
||||
| ID | Status | Owner(s) | Depends on | Description | Exit Criteria |
|
||||
|----|--------|----------|------------|-------------|---------------|
|
||||
| RISK-ENGINE-66-001 | TODO | Risk Engine Guild | POLICY-RISK-66-001 | Scaffold scoring service (job queue, worker loop, provider registry) with deterministic execution harness. | Service builds/tests; job queue runs sample job; determinism tests pass. |
|
||||
| RISK-ENGINE-66-002 | TODO | Risk Engine Guild | RISK-ENGINE-66-001 | Implement default transforms (linear, minmax, logistic, piecewise), clamping, gating, and contribution calculator. | Transform/gating unit tests passing; contribution breakdown matches golden fixtures. |
|
||||
|
||||
## Sprint 67 – Provider Integration
|
||||
| ID | Status | Owner(s) | Depends on | Description | Exit Criteria |
|
||||
|----|--------|----------|------------|-------------|---------------|
|
||||
| RISK-ENGINE-67-001 | TODO | Risk Engine Guild, Concelier Guild | RISK-ENGINE-66-002, CONCELIER-RISK-66-001 | Integrate CVSS and KEV providers pulling data from Conseiller; implement reducers (`max`, `any`, `consensus`). | Providers return sample data; reducer tests pass; provenance recorded. |
|
||||
| RISK-ENGINE-67-002 | TODO | Risk Engine Guild, Excitator Guild | RISK-ENGINE-66-002, EXCITITOR-RISK-66-001 | Integrate VEX gate provider and ensure gating short-circuits scoring as configured. | VEX gate tests pass; explanation indicates gate decision. |
|
||||
| RISK-ENGINE-67-003 | TODO | Risk Engine Guild, Policy Engine Guild | RISK-ENGINE-66-002 | Add fix availability, asset criticality, and internet exposure providers with caching + TTL enforcement. | Providers deliver normalized values; cache hit metrics exposed. |
|
||||
|
||||
## Sprint 68 – Ledger & API Wiring
|
||||
| ID | Status | Owner(s) | Depends on | Description | Exit Criteria |
|
||||
|----|--------|----------|------------|-------------|---------------|
|
||||
| RISK-ENGINE-68-001 | TODO | Risk Engine Guild, Findings Ledger Guild | RISK-ENGINE-66-002, LEDGER-RISK-66-001 | Persist scoring results + explanation pointers to Findings Ledger; handle incremental updates via input hash. | Results stored with hash; updates skip unchanged findings; tests cover dedupe. |
|
||||
| RISK-ENGINE-68-002 | TODO | Risk Engine Guild, API Guild | RISK-ENGINE-68-001, POLICY-RISK-67-002 | Expose APIs (`/risk/jobs`, `/risk/results`, `/risk/results/{id}/explanation`); include pagination, filtering, error codes. | OpenAPI documented; contract tests pass; endpoints gated by scopes. |
|
||||
|
||||
## Sprint 69 – Simulation & Performance
|
||||
| ID | Status | Owner(s) | Depends on | Description | Exit Criteria |
|
||||
|----|--------|----------|------------|-------------|---------------|
|
||||
| RISK-ENGINE-69-001 | TODO | Risk Engine Guild, Policy Studio Guild | RISK-ENGINE-68-002 | Implement simulation mode producing distributions and top movers without mutating ledger. | Simulation API returns metrics; golden tests cover scenarios. |
|
||||
| RISK-ENGINE-69-002 | TODO | Risk Engine Guild, Observability Guild | RISK-ENGINE-66-001 | Add telemetry (spans, metrics, logs) for provider latency, job throughput, cache hits; define SLO dashboards. | Metrics visible in Grafana; alerts configured for P95 latency + error rate. |
|
||||
|
||||
## Sprint 70 – Air-Gap & Advanced Providers
|
||||
| ID | Status | Owner(s) | Depends on | Description | Exit Criteria |
|
||||
|----|--------|----------|------------|-------------|---------------|
|
||||
| RISK-ENGINE-70-001 | TODO | Risk Engine Guild, Export Guild | RISK-ENGINE-67-003, RISK-BUNDLE-69-001 | Support offline provider bundles with manifest verification and missing-data reporting. | Engine loads bundle data; missing providers logged with `AIRGAP_MISSING_DATA`. |
|
||||
| RISK-ENGINE-70-002 | TODO | Risk Engine Guild, Observability Guild | RISK-ENGINE-68-002 | Integrate runtime evidence provider and reachability provider outputs with caching + TTL. | Providers return runtime/reachability signals; explanation includes sources; tests pass. |
|
||||
Reference in New Issue
Block a user