up
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Mirror Thin Bundle Sign & Verify / mirror-sign (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled

This commit is contained in:
StellaOps Bot
2025-11-26 07:47:08 +02:00
parent 56e2f64d07
commit 1c782897f7
184 changed files with 8991 additions and 649 deletions

View File

@@ -0,0 +1,29 @@
using System.Text.Json;
using StellaOps.Policy;
using Xunit;
namespace StellaOps.Policy.Tests;
public class SplSchemaResourceTests
{
[Fact]
public void Schema_IncludesReachabilityAndExploitability()
{
var schema = SplSchemaResource.GetSchema();
using var doc = JsonDocument.Parse(schema);
var match = doc.RootElement
.GetProperty("properties")
.GetProperty("spec")
.GetProperty("properties")
.GetProperty("statements")
.GetProperty("items")
.GetProperty("properties")
.GetProperty("match")
.GetProperty("properties");
Assert.True(match.TryGetProperty("reachability", out var reachability));
Assert.Equal(JsonValueKind.Object, reachability.ValueKind);
Assert.True(match.TryGetProperty("exploitability", out var exploitability));
Assert.Equal(JsonValueKind.Object, exploitability.ValueKind);
}
}