imgpkg icon indicating copy to clipboard operation
imgpkg copied to clipboard

add command to surface vulnerability scan report for a bundle

Open cppforlife opened this issue 5 years ago • 5 comments

Describe the problem/challenge you have

would like to see a vulnerability report for images that are part of a bundle.

Describe the solution you'd like

even though vulnerability scanning is an "addon" to a registry (not part of official registry APIs), i think we should try to integrate with projects like Harbor that introduce custom APIs to expose such information. i could imagine something like this:

$ imgpkg vulnreport -b registry.corp.com/apps/my-bundle

Id     State  Details              Full reference
foo    OK     0 vulnerabilities    foo@sha256:...
blah   FAIL   100 vulnerabilities  foo@sha256:...

inspiration: https://github.com/vmware-tanzu/carvel-kbld/issues/79

cppforlife avatar Dec 11 '20 17:12 cppforlife

To try to clarify the ask here, the idea would be to try to integrate with the Registry and the Registry would do the scan. Or the idea is that imgpkg should integrate directly with tools like trivy and claire, as Harbour does?

The following registries do vulnerability check already:

joaopapereira avatar Dec 11 '20 21:12 joaopapereira

Registry would do the scan

some other service (like registry) would do the scan. imgpkg hopefully would be able to retrieve results for the scan since it knows which images are in the bundle.

cppforlife avatar Dec 11 '20 22:12 cppforlife

This seems like a good idea, it's unfortunate that there isn't a universal API that we could try to target regardless of registry used. Though, we could always figure out the registry and have a mapping to their endpoints (if available).

What format should this output take? Would this be a part of some automation around e.g. failing a CI if an image has vulnerabilities? Or is there any automation component to this request?

StevenLocke avatar Dec 17 '20 23:12 StevenLocke

@DennisDenuto and I were reviewing this further, and we will go ahead and add a story to our backlog to further discuss how to make this happen.

danielhelfand avatar Jan 06 '21 22:01 danielhelfand

+1 this would be a great feature!

PushkarJ avatar Jan 13 '22 20:01 PushkarJ