0

I have the following setup (running in a KodeKloud lab):

A controlplane node installed with containerd, crictl and trivy (installed locally).

Because of a docker rate limit issue, I'm unable to pull docker images from docker.io registry but I have the relevant images saved in the local registry.

root@controlplane ~ ➜  crictl images | grep kodekl
docker.io/kodekloud/webapp-delayed-start   latest              a292f6cde2ced       33.1MB

When I run trivy and supplying a local image:

root@controlplane ~ ➜  trivy image kodekloud/webapp-delayed-start --severity CRITICAL
2024-08-07T03:34:32-04:00       INFO    Vulnerability scanning is enabled
2024-08-07T03:34:32-04:00       INFO    Secret scanning is enabled
2024-08-07T03:34:32-04:00       INFO    If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-08-07T03:34:32-04:00       INFO    Please see also https://aquasecurity.github.io/trivy/v0.51/docs/scanner/secret/#recommendation for faster secret detection
2024-08-07T03:34:32-04:00       FATAL   Fatal error     image scan error: scan error: unable to initialize a scanner: unable to initialize an image scanner: 4 errors occurred:
        * docker error: unable to inspect the image (kodekloud/webapp-delayed-start): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
        * containerd error: failed to parse image reference: kodekloud/webapp-delayed-start
        * podman error: unable to initialize Podman client: no podman socket found: stat /run/user/0/podman/podman.sock: no such file or directory
        * remote error: GET https://index.docker.io/v2/kodekloud/webapp-delayed-start/manifests/latest: TOOMANYREQUESTS: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

No matter what I try, it tries going to the docker.io registry and then encounters the rate limit issue.

Since docker command is absent, I'm unable to save an image as tar and run trivy on the tar file.

Any idea how to work around it?

Itai Ganot
  • 410
  • 2
  • 11

1 Answers1

0

Unable to get Trivy to scal local images, any idea how to do that?

scal ? or scan ?

https://aquasecurity.github.io/trivy/v0.18.3/installation/

Login again and try these

docker pull kodekloud/webapp-delayed-start
trivy image kodekloud/webapp-delayed-start --severity CRITICAL