Replies: 2 comments 1 reply
-
Actually, the error says "no such image". I think it is clear enough to understand why it's failing, but I suppose your point is that Trivy shows 4 error messages and it's confusing. Trivy supports several image sources and doesn't know from which source the user wants to fetch the image. That's why it shows several errors from Docker, contained, Podman, and container registries. If you pass If you have any ideas to improve that, we'd like to hear that. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Created #5600 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When scanning an invalid image, Trivy will output many errors which makes things more confusing that they should.
Example:
Trivy seems to blame the container runtime, but there is no issue with it as running
trivy image debian:12
will be successful.Desired Behavior
Trivy should indicate that it's unable to scan the image and state why (e.g. image not found, image name invalid, etc.)
Actual Behavior
image scan error: scan error: unable to initialize a scanner: unable to initialize a docker scanner: 4 errors occurred:
* unable to inspect the image (almfe-qkkkkaiw/fijewoew:19.3): Error response from daemon: No such image: almfe-qkkkkaiw/fijewoew:19.3
* failed to initialize a containerd client: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
* unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
* GET https://index.docker.io/v2/almfe-qkkkkaiw/fijewoew/manifests/19.3: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:almfe-qkkkkaiw/fijewoew Type:repository]]
Reproduction Steps
Run `trivy image almfe-qkkkkaiw/fijewoew:19.3`
Target
Container Image
Scanner
None
Output Format
None
Mode
None
Debug Output
Operating System
Linux
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions