Scanning image from ECR is not working #6036
Replies: 3 comments
-
Hello @saravanan-ai Have you tried using Trivy Credential? Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
-
I had used AWS ECR login ,that adds the token in docker config.json as similar to |
Beta Was this translation helpful? Give feedback.
-
Okay, thanks for answer.
It looks like there is permissions problem with |
Beta Was this translation helpful? Give feedback.
-
Description
I have pulled the image from ECR and tried to run the scan on the same but it gives error message as below . But the same time if i try pull an image from docker hub and scan it , that completely works fine . Here i know there is a documentation to use kube manifest for secrets to be used but in the case of pulling and scanning for stand alone operation like mine is not working. Can you help here
Desired Behavior
Scan results should be available
Actual Behavior
Throws error
Reproduction Steps
1.docker pull istio/distroless:latest 2. trivy image istio/distroless:latest 3. aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin xxxxxxx.dkr.ecr.us-east-1.amazonaws.com 4. docker pull xxxx.dkr.ecr.us-east-1.amazonaws.com/xxx:latest 5.trivy image xxxx.dkr.ecr.us-east-1.amazonaws.com/xxx:latest ...
Target
Container Image
Scanner
Vulnerability
Output Format
None
Mode
None
Debug Output
2024-02-01T10:11:41.916Z FATAL image scan error: github.com/aquasecurity/trivy/pkg/commands/artifact.Run /home/runner/work/trivy/trivy/pkg/commands/artifact/run.go:425 - scan error: github.com/aquasecurity/trivy/pkg/commands/artifact.(*runner).scanArtifact /home/runner/work/trivy/trivy/pkg/commands/artifact/run.go:269 - unable to initialize a scanner: github.com/aquasecurity/trivy/pkg/commands/artifact.scan /home/runner/work/trivy/trivy/pkg/commands/artifact/run.go:700 - unable to initialize an image scanner: github.com/aquasecurity/trivy/pkg/commands/artifact.imageStandaloneScanner /home/runner/work/trivy/trivy/pkg/commands/artifact/scanner.go:18
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions