You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works - and I able to pull the image without any issues:
docker image pull docker:cli
But this doesn't:
grype docker:cli
✔ Vulnerability DB [no update available]
✔ Pulled image
failed to catalog: an error occurred attempting to resolve 'cli': docker: pull failed: Error response from daemon: pull access denied for cli, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
I able to scan any image with Grype beside docker:cli image. It's weird. This is actually the first time it threw auth issue.
After pull the image with docker pull, this worked:
grype docker.io/library/docker:cli
What you expected to happen:
It should able to pull the image?
How to reproduce it (as minimally and precisely as possible):
I don't know to provide reproducible steps here, sorry.
Dentrax
changed the title
Grype says "requested access to the resource is denied" even I have access with Docker
Grype throws "requested access to the resource is denied" even I have access with Docker
Oct 5, 2024
A workaround for the behavior you're seeing is this:
grype docker:docker:cli
What's happening here is that grype is interpreting docker: as a scheme on how to fetch the image, in this case saying to fetch the image from the local docker daemon (where the valid syft/grype values here are docker, podman, registry, etc). Since there is a name collision with these schemes and the image you're using grype is interpreting your input as fetching the image cli:latest via the local docker daemon.
The only way to really fix all cases for this here is a CLI redesign where we accept either a URLish thing:
grype docker://docker:cli
or we start introducing other flags, similar to what we added in syft to do this:
What happened:
This works - and I able to pull the image without any issues:
But this doesn't:
I able to scan any image with Grype beside
docker:cli
image. It's weird. This is actually the first time it threw auth issue.After pull the image with
docker pull
, this worked:What you expected to happen:
It should able to pull the image?
How to reproduce it (as minimally and precisely as possible):
I don't know to provide reproducible steps here, sorry.
Anything else we need to know?:
Environment:
grype version
:cat /etc/os-release
or similar):macOS 14
The text was updated successfully, but these errors were encountered: