// // SPDX-License-Identifier: BUSL-1.1 // Sprint: SPRINT_20260112_008_LB_binary_diff_evidence_models (BINDIFF-LB-001) // using System.Collections.Immutable; namespace StellaOps.Evidence.Bundle; /// /// Binary diff evidence capturing semantic and structural changes between binary versions. /// public sealed class BinaryDiffEvidence { /// /// Status of the binary diff evidence. /// public required EvidenceStatus Status { get; init; } /// /// SHA-256 hash of the diff evidence content. /// public string? Hash { get; init; } /// /// Previous binary artifact digest. /// public string? PreviousBinaryDigest { get; init; } /// /// Current binary artifact digest. /// public string? CurrentBinaryDigest { get; init; } /// /// Type of binary diff performed. /// public BinaryDiffType DiffType { get; init; } /// /// Binary format or ISA (e.g., "elf-x86_64", "pe-amd64", "macho-arm64"). /// public string? BinaryFormat { get; init; } /// /// Tool and version used for diffing. /// public string? ToolVersion { get; init; } /// /// Overall similarity score (0.0-1.0). /// public double? SimilarityScore { get; init; } /// /// Function-level changes. /// public ImmutableArray FunctionChanges { get; init; } = []; /// /// Symbol-level changes. /// public ImmutableArray SymbolChanges { get; init; } = []; /// /// Section-level changes. /// public ImmutableArray SectionChanges { get; init; } = []; /// /// Semantic fingerprint changes. /// public BinarySemanticDiff? SemanticDiff { get; init; } /// /// Security-relevant changes detected. /// public ImmutableArray SecurityChanges { get; init; } = []; /// /// Reason if diff is unavailable. /// public string? UnavailableReason { get; init; } /// /// Previous scan ID for reference. /// public string? PreviousScanId { get; init; } /// /// Previous scan time. /// public DateTimeOffset? PreviousScanTime { get; init; } /// /// When this diff was computed. /// public DateTimeOffset? ComputedAt { get; init; } }