namespace StellaOps.Scanner.Emit.Native;
///
/// Metadata for a native binary component.
///
public sealed record NativeBinaryMetadata
{
/// Binary format (elf, pe, macho)
public required string Format { get; init; }
/// Build-ID with prefix (gnu-build-id:..., pe-cv:..., macho-uuid:...)
public string? BuildId { get; init; }
/// CPU architecture (x86_64, aarch64, arm, i686, etc.)
public string? Architecture { get; init; }
/// Whether this is a 64-bit binary
public bool Is64Bit { get; init; }
/// Operating system or platform
public string? Platform { get; init; }
/// File path within the container layer
public required string FilePath { get; init; }
/// SHA-256 digest of the file
public string? FileDigest { get; init; }
/// File size in bytes
public long FileSize { get; init; }
/// Container layer digest where this binary was introduced
public string? LayerDigest { get; init; }
/// Layer index (0-based)
public int LayerIndex { get; init; }
/// Product version from PE version resource
public string? ProductVersion { get; init; }
/// File version from PE version resource
public string? FileVersion { get; init; }
/// Company name from PE version resource
public string? CompanyName { get; init; }
/// Hardening flags (PIE, RELRO, NX, etc.)
public IReadOnlyDictionary? HardeningFlags { get; init; }
/// Whether the binary is signed
public bool IsSigned { get; init; }
/// Signature details (Authenticode, codesign, etc.)
public string? SignatureDetails { get; init; }
/// Imported libraries (DLL names for PE, SO names for ELF, dylib names for Mach-O)
public IReadOnlyList? Imports { get; init; }
/// Exported symbols (for dependency analysis)
public IReadOnlyList? Exports { get; init; }
}