diff --git a/recommend/registry/registry.go b/recommend/registry/registry.go index 6fd9b475..c65cb935 100644 --- a/recommend/registry/registry.go +++ b/recommend/registry/registry.go @@ -78,6 +78,9 @@ func (r *Scanner) loadDockerAuthConfigs() { } for _, conf := range confsWrapper.Auths { + if len(conf.Auth) == 0 { + continue + } data, _ := base64.StdEncoding.DecodeString(conf.Auth) userPass := strings.SplitN(string(data), ":", 2) r.authConfiguration.authCreds = append(r.authConfiguration.authCreds, getAuthStr(userPass[0], userPass[1]))