feat(security): prefer digest identity in scan history (#1610)

Retain scans and History search by digest when available, keep imageRefLike for compatibility, and surface digests in compare.
This commit is contained in:
Anso
2026-07-10 22:10:09 -04:00
committed by GitHub
parent 8fd526ba05
commit 4834e2e51d
17 changed files with 561 additions and 97 deletions
@@ -187,6 +187,8 @@ describe('GET /api/security/compare', () => {
expect(res.status).toBe(200);
expect(res.body.scanA.id).toBe(baseline);
expect(res.body.scanB.id).toBe(current);
expect(res.body.scanA).toHaveProperty('image_digest');
expect(res.body.scanB).toHaveProperty('image_digest');
expect(res.body.added).toHaveLength(1);
expect(res.body.added[0].vulnerability_id).toBe('CVE-2024-0003');
expect(res.body.removed).toHaveLength(1);