feat: Document completed tasks for KMS, Cryptography, and Plugin Libraries

- Added detailed task completion records for KMS interface implementation and CLI support for file-based keys.
- Documented security enhancements including Argon2id password hashing, audit event contracts, and rate limiting configurations.
- Included scoped service support and integration updates for the Plugin platform, ensuring proper DI handling and testing coverage.
This commit is contained in:
master
2025-10-31 14:37:45 +02:00
parent 240e8ff25d
commit 15b4a1de6a
312 changed files with 6399 additions and 3319 deletions

View File

@@ -34,8 +34,8 @@ public sealed class PlatformEventSamplesTests
Assert.NotEqual(Guid.Empty, orchestratorEvent.EventId);
Assert.NotNull(orchestratorEvent.Payload);
AssertCanonical(json, orchestratorEvent);
AssertReportConsistency(orchestratorEvent);
AssertCanonical(json, orchestratorEvent);
}
private static void AssertCanonical(string originalJson, OrchestratorEvent orchestratorEvent)
@@ -58,18 +58,38 @@ public sealed class PlatformEventSamplesTests
Assert.Equal(ready.ReportId, ready.Report.ReportId);
Assert.Equal(ready.ScanId, ready.Report.ReportId);
AssertDsseMatchesReport(ready.Dsse, ready.Report);
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Ui));
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Report));
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Attestation));
Assert.NotNull(ready.Links.Report);
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Report!.Ui));
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Report!.Api));
if (ready.Links.Policy is not null)
{
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Policy.Ui));
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Policy.Api));
}
if (ready.Links.Attestation is not null)
{
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Attestation.Ui));
Assert.False(string.IsNullOrWhiteSpace(ready.Links.Attestation.Api));
}
break;
case ScanCompletedEventPayload completed:
Assert.Equal(completed.ReportId, completed.Report.ReportId);
Assert.Equal(completed.ScanId, completed.Report.ReportId);
AssertDsseMatchesReport(completed.Dsse, completed.Report);
Assert.NotEmpty(completed.Findings);
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Ui));
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Report));
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Attestation));
Assert.NotNull(completed.Links.Report);
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Report!.Ui));
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Report!.Api));
if (completed.Links.Policy is not null)
{
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Policy.Ui));
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Policy.Api));
}
if (completed.Links.Attestation is not null)
{
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Attestation.Ui));
Assert.False(string.IsNullOrWhiteSpace(completed.Links.Attestation.Api));
}
break;
default:
throw new InvalidOperationException($"Unexpected payload type {orchestratorEvent.Payload.GetType().Name}.");
@@ -118,6 +138,16 @@ public sealed class PlatformEventSamplesTests
_ => throw new InvalidOperationException("Unexpected event kind.")
};
if (payload is ReportReadyEventPayload readyPayload && string.IsNullOrEmpty(readyPayload.ReportId))
{
throw new InvalidOperationException("ReportId was not parsed from sample payload.");
}
if (payload is ScanCompletedEventPayload completedPayload && string.IsNullOrEmpty(completedPayload.ReportId))
{
throw new InvalidOperationException("ReportId was not parsed from scan completed payload.");
}
return new OrchestratorEvent
{
EventId = Guid.Parse(root["eventId"]!.GetValue<string>()),