new advisories work and features gaps work

This commit is contained in:
master
2026-01-14 18:39:19 +02:00
parent 95d5898650
commit 15aeac8e8b
148 changed files with 16731 additions and 554 deletions

View File

@@ -12,6 +12,8 @@ public sealed class EvidenceBundleBuilder
private VexStatusEvidence? _vexStatus;
private DiffEvidence? _diff;
private GraphRevisionEvidence? _graphRevision;
// Sprint: SPRINT_20260112_008_LB_binary_diff_evidence_models (BINDIFF-LB-002)
private BinaryDiffEvidence? _binaryDiff;
public EvidenceBundleBuilder(TimeProvider timeProvider) => _timeProvider = timeProvider ?? throw new ArgumentNullException(nameof(timeProvider));
public EvidenceBundleBuilder() : this(TimeProvider.System) { }
@@ -24,6 +26,8 @@ public sealed class EvidenceBundleBuilder
public EvidenceBundleBuilder WithVexStatus(VexStatusEvidence e) { _vexStatus = e; return this; }
public EvidenceBundleBuilder WithDiff(DiffEvidence e) { _diff = e; return this; }
public EvidenceBundleBuilder WithGraphRevision(GraphRevisionEvidence e) { _graphRevision = e; return this; }
// BINDIFF-LB-002: Add binary diff builder method
public EvidenceBundleBuilder WithBinaryDiff(BinaryDiffEvidence e) { _binaryDiff = e; return this; }
public EvidenceBundle Build()
{
@@ -37,6 +41,8 @@ public sealed class EvidenceBundleBuilder
if (_vexStatus?.Hash is not null) hashes["vex"] = _vexStatus.Hash;
if (_diff?.Hash is not null) hashes["diff"] = _diff.Hash;
if (_graphRevision?.Hash is not null) hashes["graph"] = _graphRevision.Hash;
// BINDIFF-LB-002: Include binary diff hash
if (_binaryDiff?.Hash is not null) hashes["binaryDiff"] = _binaryDiff.Hash;
return new EvidenceBundle
{
@@ -48,6 +54,7 @@ public sealed class EvidenceBundleBuilder
VexStatus = _vexStatus,
Diff = _diff,
GraphRevision = _graphRevision,
BinaryDiff = _binaryDiff,
Hashes = hashes.Count > 0 ? EvidenceHashSet.Compute(hashes) : EvidenceHashSet.Empty(),
CreatedAt = _timeProvider.GetUtcNow()
};