up
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Concelier Attestation Tests / attestation-tests (push) Has been cancelled
Export Center CI / export-ci (push) Has been cancelled
Notify Smoke Test / Notify Unit Tests (push) Has been cancelled
Notify Smoke Test / Notifier Service Tests (push) Has been cancelled
Notify Smoke Test / Notification Smoke Test (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Scanner Analyzers / Discover Analyzers (push) Has been cancelled
Scanner Analyzers / Build Analyzers (push) Has been cancelled
Scanner Analyzers / Test Language Analyzers (push) Has been cancelled
Scanner Analyzers / Validate Test Fixtures (push) Has been cancelled
Scanner Analyzers / Verify Deterministic Output (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Concelier Attestation Tests / attestation-tests (push) Has been cancelled
Export Center CI / export-ci (push) Has been cancelled
Notify Smoke Test / Notify Unit Tests (push) Has been cancelled
Notify Smoke Test / Notifier Service Tests (push) Has been cancelled
Notify Smoke Test / Notification Smoke Test (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Scanner Analyzers / Discover Analyzers (push) Has been cancelled
Scanner Analyzers / Build Analyzers (push) Has been cancelled
Scanner Analyzers / Test Language Analyzers (push) Has been cancelled
Scanner Analyzers / Validate Test Fixtures (push) Has been cancelled
Scanner Analyzers / Verify Deterministic Output (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
This commit is contained in:
@@ -1,109 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text.Json.Serialization;
|
||||
using StellaOps.Scanner.Core.Contracts;
|
||||
|
||||
namespace StellaOps.Scanner.Diff;
|
||||
|
||||
public enum ComponentChangeKind
|
||||
{
|
||||
Added,
|
||||
Removed,
|
||||
VersionChanged,
|
||||
MetadataChanged,
|
||||
}
|
||||
|
||||
public sealed record ComponentDiffRequest
|
||||
{
|
||||
public required ComponentGraph OldGraph { get; init; }
|
||||
|
||||
public required ComponentGraph NewGraph { get; init; }
|
||||
|
||||
public SbomView View { get; init; } = SbomView.Inventory;
|
||||
|
||||
public DateTimeOffset GeneratedAt { get; init; } = DateTimeOffset.UtcNow;
|
||||
|
||||
public string? OldImageDigest { get; init; }
|
||||
= null;
|
||||
|
||||
public string? NewImageDigest { get; init; }
|
||||
= null;
|
||||
}
|
||||
|
||||
public sealed record ComponentChange
|
||||
{
|
||||
[JsonPropertyName("kind")]
|
||||
public ComponentChangeKind Kind { get; init; }
|
||||
|
||||
[JsonPropertyName("componentKey")]
|
||||
public string ComponentKey { get; init; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("introducingLayer")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? IntroducingLayer { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("removingLayer")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? RemovingLayer { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("oldComponent")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public AggregatedComponent? OldComponent { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("newComponent")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public AggregatedComponent? NewComponent { get; init; }
|
||||
= null;
|
||||
}
|
||||
|
||||
public sealed record LayerDiff
|
||||
{
|
||||
[JsonPropertyName("layerDigest")]
|
||||
public string LayerDigest { get; init; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("changes")]
|
||||
public ImmutableArray<ComponentChange> Changes { get; init; } = ImmutableArray<ComponentChange>.Empty;
|
||||
}
|
||||
|
||||
public sealed record DiffSummary
|
||||
{
|
||||
[JsonPropertyName("added")]
|
||||
public int Added { get; init; }
|
||||
|
||||
[JsonPropertyName("removed")]
|
||||
public int Removed { get; init; }
|
||||
|
||||
[JsonPropertyName("versionChanged")]
|
||||
public int VersionChanged { get; init; }
|
||||
|
||||
[JsonPropertyName("metadataChanged")]
|
||||
public int MetadataChanged { get; init; }
|
||||
}
|
||||
|
||||
public sealed record ComponentDiffDocument
|
||||
{
|
||||
[JsonPropertyName("generatedAt")]
|
||||
public DateTimeOffset GeneratedAt { get; init; }
|
||||
|
||||
[JsonPropertyName("view")]
|
||||
public SbomView View { get; init; }
|
||||
|
||||
[JsonPropertyName("oldImageDigest")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? OldImageDigest { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("newImageDigest")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? NewImageDigest { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("summary")]
|
||||
public DiffSummary Summary { get; init; } = new();
|
||||
|
||||
[JsonPropertyName("layers")]
|
||||
public ImmutableArray<LayerDiff> Layers { get; init; } = ImmutableArray<LayerDiff>.Empty;
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text.Json.Serialization;
|
||||
using StellaOps.Scanner.Core.Contracts;
|
||||
|
||||
namespace StellaOps.Scanner.Diff;
|
||||
|
||||
public enum ComponentChangeKind
|
||||
{
|
||||
Added,
|
||||
Removed,
|
||||
VersionChanged,
|
||||
MetadataChanged,
|
||||
}
|
||||
|
||||
public sealed record ComponentDiffRequest
|
||||
{
|
||||
public required ComponentGraph OldGraph { get; init; }
|
||||
|
||||
public required ComponentGraph NewGraph { get; init; }
|
||||
|
||||
public SbomView View { get; init; } = SbomView.Inventory;
|
||||
|
||||
public DateTimeOffset GeneratedAt { get; init; } = DateTimeOffset.UtcNow;
|
||||
|
||||
public string? OldImageDigest { get; init; }
|
||||
= null;
|
||||
|
||||
public string? NewImageDigest { get; init; }
|
||||
= null;
|
||||
}
|
||||
|
||||
public sealed record ComponentChange
|
||||
{
|
||||
[JsonPropertyName("kind")]
|
||||
public ComponentChangeKind Kind { get; init; }
|
||||
|
||||
[JsonPropertyName("componentKey")]
|
||||
public string ComponentKey { get; init; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("introducingLayer")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? IntroducingLayer { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("removingLayer")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? RemovingLayer { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("oldComponent")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public AggregatedComponent? OldComponent { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("newComponent")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public AggregatedComponent? NewComponent { get; init; }
|
||||
= null;
|
||||
}
|
||||
|
||||
public sealed record LayerDiff
|
||||
{
|
||||
[JsonPropertyName("layerDigest")]
|
||||
public string LayerDigest { get; init; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("changes")]
|
||||
public ImmutableArray<ComponentChange> Changes { get; init; } = ImmutableArray<ComponentChange>.Empty;
|
||||
}
|
||||
|
||||
public sealed record DiffSummary
|
||||
{
|
||||
[JsonPropertyName("added")]
|
||||
public int Added { get; init; }
|
||||
|
||||
[JsonPropertyName("removed")]
|
||||
public int Removed { get; init; }
|
||||
|
||||
[JsonPropertyName("versionChanged")]
|
||||
public int VersionChanged { get; init; }
|
||||
|
||||
[JsonPropertyName("metadataChanged")]
|
||||
public int MetadataChanged { get; init; }
|
||||
}
|
||||
|
||||
public sealed record ComponentDiffDocument
|
||||
{
|
||||
[JsonPropertyName("generatedAt")]
|
||||
public DateTimeOffset GeneratedAt { get; init; }
|
||||
|
||||
[JsonPropertyName("view")]
|
||||
public SbomView View { get; init; }
|
||||
|
||||
[JsonPropertyName("oldImageDigest")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? OldImageDigest { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("newImageDigest")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? NewImageDigest { get; init; }
|
||||
= null;
|
||||
|
||||
[JsonPropertyName("summary")]
|
||||
public DiffSummary Summary { get; init; } = new();
|
||||
|
||||
[JsonPropertyName("layers")]
|
||||
public ImmutableArray<LayerDiff> Layers { get; init; } = ImmutableArray<LayerDiff>.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user