gcloud docker images scan - could not detect operating system of image, scan aborted

Viewed 40
gcloud artifacts docker images scan hello-world

is throwing following error.

(gcloud.artifacts.docker.images.scan) Extraction failed: could not detect operating system of image, scan aborted

Any feedback on how to resolve this error?

1 Answers

As per the official document it is mentioned that the OS scanning overview supports vulnerability scanning for the following OS versions:

  • Debian GNU/Linux - Versions: 9, 10, 11
  • Ubuntu - Versions: 12.04, 12.10, 13.04, 14.04, 14.10, 15.04, 15.10, 16.04, 16.10, 17.04, 17.10, 18.04, 18.10, 20.04, 20.10, 21.04, 21.10, 22.04
  • Alpine Linux - Versions: 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15, 3.16
  • CentOS - Versions: 6, 7, 8, 9 and minor versions
  • Redhat - Versions: 6, 7, 8, 9 and minor versions

Please check if the docker image you are using has one the above supported OS , if not then it would result in the scan not detecting the operating system of the image, and aborts the scan with extraction failed error.
I would recommend you to have a look at the Artifact Registry scanning and Vulnerabilities scan document for further detailed information.

Related