diff --git a/cvetools/cvesearch.go b/cvetools/cvesearch.go index 4648502e..777a90c9 100644 --- a/cvetools/cvesearch.go +++ b/cvetools/cvesearch.go @@ -303,6 +303,9 @@ func (cv *ScanTools) ScanImage(ctx context.Context, req *share.ScanImageRequest, rc := scan.NewRegClient(baseReg, req.Token, req.Username, req.Password, req.Proxy, new(httptrace.NopTracer)) info, errCode = rc.GetImageInfo(ctx, baseRepo, baseTag, registry.ManifestRequest_Default) + if errCode == share.ScanErrorCode_ScanErrImageNotFound { + info, errCode = rc.GetImageInfo(ctx, baseRepo, baseTag, registry.ManifestRequest_CosignSignature) + } if errCode != share.ScanErrorCode_ScanErrNone { result.Error = errCode return result, nil @@ -317,6 +320,9 @@ func (cv *ScanTools) ScanImage(ctx context.Context, req *share.ScanImageRequest, rc := scan.NewRegClient(req.Registry, req.Token, req.Username, req.Password, req.Proxy, new(httptrace.NopTracer)) info, errCode = rc.GetImageInfo(ctx, req.Repository, req.Tag, registry.ManifestRequest_Default) + if errCode == share.ScanErrorCode_ScanErrImageNotFound { + info, errCode = rc.GetImageInfo(ctx, req.Repository, req.Tag, registry.ManifestRequest_CosignSignature) + } if errCode != share.ScanErrorCode_ScanErrNone { result.Error = errCode return result, nil