-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
karmor recommend fails with a panic error on MacOS M1 #459
Comments
Looks like the issue is the way the client parses the Docker auth file on MacOS. It expects real values in config.json whereas on MacOS the actual passwords are stored in the KeyChain and not in the file. Since it doesn;t check for an empty response, the code fails when it tries to extract username and password. |
Hey, @daemon1024 assign this to me. I have a mac machine with an M1 chip. |
@anurag-rajawat I tactically solved this in a local built copy by adding a check for Auth being an empty string. I started to look at how credentialHelpers work and it should be possible to extend logic to correctly pull credentials from the helpers for each configured source. I am not a GoLang programmer otherwise would put in a PR. |
karmor recommend
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/kubearmor/kubearmor-client/recommend/registry.(*Scanner).loadDockerAuthConfigs(0x140000d6ec0)
/home/runner/work/kubearmor-client/kubearmor-client/recommend/registry/registry.go:83 +0x35c
github.com/kubearmor/kubearmor-client/recommend/registry.New({0x140002d3440, 0x27})
/home/runner/work/kubearmor-client/kubearmor-client/recommend/registry/registry.go:106 +0x178
github.com/kubearmor/kubearmor-client/recommend.Recommend(0x140005e0b40, {{0x10910fa60, 0x0, 0x0}, {0x10910fa60, 0x0, 0x0}, {0x0, 0x0, 0x0}, ...}, ...)
/home/runner/work/kubearmor-client/kubearmor-client/recommend/recommend.go:186 +0x238
github.com/kubearmor/kubearmor-client/cmd.glob..func9(0x140003ecb00?, {0x106921140?, 0x4?, 0x106921144?})
/home/runner/work/kubearmor-client/kubearmor-client/cmd/recommend.go:22 +0x70
github.com/spf13/cobra.(*Command).execute(0x10909e4e0, {0x10910fa60, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x10909e7c0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/kubearmor/kubearmor-client/cmd.Execute()
/home/runner/work/kubearmor-client/kubearmor-client/cmd/root.go:49 +0x24
main.main()
/home/runner/work/kubearmor-client/kubearmor-client/main.go:10 +0x1c
OS: MacOS on M1
Version: 1.2.3
The text was updated successfully, but these errors were encountered: