feat(security): scan comparison UI (#648)

Side-by-side vulnerability scan comparison with two entry points:

- Compare button plus inline baseline picker inside the scan drawer.
- New Scan History page reachable from the Resources Hub, grouping
  completed scans by image with a checkbox selection flow.

The comparison sheet shows a severity delta ribbon, Added/Removed/Unchanged
filters, and a paginated CVE table. Cross-image comparisons are allowed
but flagged with a warning. Compare access is gated to Skipper and
Admiral tiers; the underlying /security/compare endpoint is unchanged.
This commit is contained in:
Anso
2026-04-16 23:15:36 -04:00
committed by GitHub
parent e660d2a658
commit 8ee0c0c476
8 changed files with 806 additions and 6 deletions
+17
View File
@@ -80,3 +80,20 @@ export interface ScanPolicy {
created_at: number;
updated_at: number;
}
export interface ScanCompareVulnerability {
vulnerability_id: string;
pkg_name: string;
severity: VulnSeverity;
installed_version?: string;
fixed_version?: string | null;
primary_url?: string | null;
}
export interface ScanCompareResult {
scanA: { id: number; scanned_at: number; image_ref: string };
scanB: { id: number; scanned_at: number; image_ref: string };
added: ScanCompareVulnerability[];
removed: ScanCompareVulnerability[];
unchanged: Pick<ScanCompareVulnerability, 'vulnerability_id' | 'pkg_name' | 'severity'>[];
}