Commit 25097ff
authored
feat: add ztsd layer support for cve scans (#4258)
* feat: add ztsd layer support for cve scans
Fixes issue #4255
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
* test(cve): cover zstd-compressed layers in scannability check
Add a case exercising ispec.MediaTypeImageLayerZstd alongside the
existing gzip case in TestImageScannable, per Copilot review feedback
that the new accepted media type had no test coverage.
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
* test(cve): clarify zstd scannability test description
Reword the Convey description to state that the test validates
acceptance of the zstd layer media type, not decompression of actual
zstd-compressed content, per Copilot review feedback that the test
data (an empty JSON blob) doesn't exercise decompression.
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
* fix(cve): guard against empty Manifests in isManifestScanable
Real ingestion paths (OnUpdateManifest, ParseStorage) always populate
ImageMeta.Manifests with exactly one entry for an ImageManifest, via
convert.GetImageManifestMeta. But isManifestScanable reads independently
from metaDB and indexes Manifests[0] unconditionally, so a stale or
malformed metadb entry would panic the scan instead of surfacing as an
error, per Copilot review feedback.
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
* fix(cve): correct typo in isManifestScannable and error message spacing
Addresses Copilot review nits on scanner.go: rename isManifestScanable
to isManifestScannable to match sibling helpers (IsImageFormatScannable,
isIndexScannable, isManifestDataScannable), and remove a double space
in the "0 manifests" error message.
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
---------
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>1 parent 21d5902 commit 25097ff
2 files changed
Lines changed: 48 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
469 | 488 | | |
470 | 489 | | |
471 | 490 | | |
| |||
475 | 494 | | |
476 | 495 | | |
477 | 496 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
| 497 | + | |
| 498 | + | |
485 | 499 | | |
486 | 500 | | |
487 | | - | |
| 501 | + | |
488 | 502 | | |
489 | 503 | | |
490 | 504 | | |
491 | 505 | | |
492 | 506 | | |
493 | 507 | | |
494 | 508 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
| 509 | + | |
505 | 510 | | |
506 | 511 | | |
507 | 512 | | |
| |||
896 | 901 | | |
897 | 902 | | |
898 | 903 | | |
899 | | - | |
| 904 | + | |
900 | 905 | | |
901 | 906 | | |
902 | 907 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
453 | 465 | | |
454 | 466 | | |
455 | 467 | | |
| |||
463 | 475 | | |
464 | 476 | | |
465 | 477 | | |
466 | | - | |
| 478 | + | |
467 | 479 | | |
468 | 480 | | |
469 | 481 | | |
| |||
487 | 499 | | |
488 | 500 | | |
489 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
490 | 508 | | |
491 | 509 | | |
492 | 510 | | |
| |||
0 commit comments