mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-27 10:46:51 +00:00
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:
@@ -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'>[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user