Open qinshaoxuan opened 4 years ago
Good catch @qinshaoxuan . Does that mean that you pushed a scratch image to your registry and tried scanning it with Clair scanner? If not would you mind sharing the Dockerfile to reproduce it?
@danielpacak Yes. It's a scratch image with some labels. Dockerfile:
FROM scratch
LABEL ENV=a
@danielpacak @qinshaoxuan Any updates on this? We are facing this issue still with our clair scanners.
We should be failing gracefully here IMO
The progress crashed when server receiving a scan request that the number of image layers is 0
Trace
Cause by https://github.com/goharbor/harbor-scanner-clair/blob/9b8ec347fa7cd8154d90069a56bded96051db084/pkg/scanner/adapter.go#L51