CKS Lab Challenge 1

Hi,

I am trying the Lab Challenge 1, under CKS - Challenges

  1. While trying to do a trivy scan, i am getting this error
    root@controlplane /etc/apt/sources.list.d ➜ trivy image --severity CRITICAL nginx:1.17
    2024-11-03T10:58:40Z INFO [vuln] Vulnerability scanning is enabled
    2024-11-03T10:58:40Z INFO [secret] Secret scanning is enabled
    2024-11-03T10:58:40Z INFO [secret] If your scanning is slow, please try ‘–scanners vuln’ to disable secret scanning
    2024-11-03T10:58:40Z INFO [secret] Please see also Secret - Trivy for faster secret detection
    2024-11-03T10:58:40Z FATAL Fatal error image scan error: scan error: scan failed: failed analysis: analyze error: pipeline error: failed to analyze layer (sha256:ffc9b21953f4cd7956cdf532a5db04ff0a2daa7475ad796f1bad58cfbaf77a07): unable to get uncompressed layer sha256:ffc9b21953f4cd7956cdf532a5db04ff0a2daa7475ad796f1bad58cfbaf77a07: failed to get the layer (sha256:ffc9b21953f4cd7956cdf532a5db04ff0a2daa7475ad796f1bad58cfbaf77a07): unable to populate: unable to open: failed to copy the image: image “nginx:1.17”: not found

Because the images are stored locally in critctl’ repo (docker is not installed on this lab), you have to use the fully qualified image name.
Docker local store you can omit docker.io/library

trivy image --severity CRITICAL docker.io/library/nginx:1.17

Try running crictl image ls to see this

1 Like