From e2d828afe28eb8405c3414e27c694e2f8e3db686 Mon Sep 17 00:00:00 2001 From: mrrishi Date: Sun, 10 Nov 2024 00:01:21 +0530 Subject: [PATCH] fix: recommend Signed-off-by: mrrishi --- recommend/registry/registry.go | 3 +++ 1 file changed, 3 insertions(+) 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]))