license switch agpl -> busl1, sprints work, new product advisories

This commit is contained in:
master
2026-01-20 15:32:20 +02:00
parent 4903395618
commit c32fff8f86
1835 changed files with 38630 additions and 4359 deletions

View File

@@ -256,6 +256,48 @@ public sealed class CycloneDxExtractorTests
Assert.Single(result.ComponentPurls);
}
[Fact]
public async Task ExtractParsedAsync_ValidCycloneDx_ExtractsParsedSbom()
{
var sbom = """
{
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
"version": 1,
"metadata": {
"timestamp": "2026-01-18T12:00:00Z",
"component": {
"type": "application",
"bom-ref": "acme-app",
"name": "ACME Application",
"version": "1.0.0",
"purl": "pkg:docker/acme/app@1.0.0"
}
},
"components": [
{
"type": "library",
"bom-ref": "component-1",
"name": "some-lib",
"purl": "pkg:npm/some-lib@1.0.0"
}
]
}
""";
using var stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(sbom));
var result = await _extractor.ExtractParsedAsync(stream);
Assert.Equal("cyclonedx", result.Format);
Assert.Equal("1.5", result.SpecVersion);
Assert.Equal("urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79", result.SerialNumber);
Assert.Equal("ACME Application", result.Metadata.Name);
Assert.Equal("acme-app", result.Metadata.RootComponentRef);
Assert.Contains(result.Components, component => component.BomRef == "acme-app");
Assert.Contains(result.Components, component => component.BomRef == "component-1");
}
[Fact]
public async Task ExtractAsync_MissingOptionalFields_Succeeds()
{