kubeclarity: Credentials not found
What happened:
Trying to scan a pod containing a private image and it fails, public images are scanned.
$ oc logs scanner-zap2docker-stable-b72cafcd-4ccc-47cd-8e79-1fb6--1-jpr67 -n sbu-dev
time="2022-04-26T16:21:19Z" level=debug msg="Credentials not found. image name=uk.icr.io/sbu-pipeline/zap2docker-stable@sha256:6c9d3f2cc80470bb4b54fb4b402ff982905e5cb2f13648b571da37e277540f00." \
func="github.com/cisco-open/kubei/shared/pkg/utils/creds.(*CredExtractor).GetCredentials" file="/build/shared/pkg/utils/creds/extractor.go:78"
What you expected to happen:
I expect the secret (which is available in the namespace being scanned) to be obtained and used.
How to reproduce it (as minimally and precisely as possible):
Deploy kubeclarify v2.1.2 to k8s and perform a namespace scan whereby images within namespace are in a private registry.
Are there any error messages in KubeClarity logs?
$ oc logs scanner-zap2docker-stable-b72cafcd-4ccc-47cd-8e79-1fb6--1-jpr67 -n sbu-dev
time="2022-04-26T16:21:19Z" level=debug msg="Credentials not found. image name=uk.icr.io/sbu-pipeline/zap2docker-stable@sha256:6c9d3f2cc80470bb4b54fb4b402ff982905e5cb2f13648b571da37e277540f00." \
func="github.com/cisco-open/kubei/shared/pkg/utils/creds.(*CredExtractor).GetCredentials" file="/build/shared/pkg/utils/creds/extractor.go:78"
Anything else we need to know?:
Environment:
- KubeClarity version: v2.1.2
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (14 by maintainers)
Commits related to this issue
- fix: update go-containerregistry dependency to solve https://github.com/cisco-open/kubei/issues/139 — committed to openclarity/kubeclarity by FrimIdan 2 years ago
- fix: update go-containerregistry dependency (#143) * fix: update go-containerregistry dependency to solve https://github.com/cisco-open/kubei/issues/139 * go mod tidy all — committed to openclarity/kubeclarity by FrimIdan 2 years ago
Hi @mtcolman found the following commit in go-containerregistry https://github.com/google/go-containerregistry/commit/892d7a8083870277d85bb98bc4f27a2b6d1596b0 pushed 14 days ago. It should fix that issue here, we will update go.mod and will add a test case.
@FrimIdan tested and looks good, yes I believe you can close. Thanks for speedy fix.