usr42/clair-container-scan

While running the clair-container-scan script for local images sometimes it fails with "No image Scanned" message

Opened this issue · 7 comments

While running the clair-container script for local images sometimes it fails with "No image scanned"

I got the same error when i tried to scan alpine:edge today

usr42 commented

clair-container-scan is not pulling images, but only scanning locally available images, yet.
So, if the image your trying to scan is not available, it will result in a No image scanned output.

@mfmcdonagh Can you try to run:

docker pull alpine:edge

before you run

./clair-container-scan.sh alpine:edge

Is the issue then still happening?

@nishanthboovathy Sorry, that I did not respond earlier. I somehow missed your message.
Did the issue for you also happen, when you were scanning a particular image?

[gen] mc@onagm ~/tmp $ docker pull docker.io/alpine:edge
edge: Pulling from library/alpine
Digest: sha256:6199d795f07e4520fa0169efd5779dcf399cbfd33c73e15b482fcd21c42e1750
Status: Image is up to date for alpine:edge
[gen] mc@onagm ~/tmp $ ./clair-container-scan.sh alpine:edge
No image scanned.

Sorry but that didn't help

usr42 commented

I can reproduce the issue and will investigate.

Thanks for the information!

usr42 commented

It seems to be an clair issue:
This is the output I get when running manually:

2019/03/08 13:47:26 [INFO] ▶ Start clair-scanner
2019/03/08 13:47:27 [INFO] ▶ Server listening on port 9279
2019/03/08 13:47:27 [INFO] ▶ Analyzing bceea3f8448a2364d40fb31ef81d1a68437bb05d0701615f0959bc0095ca72e2
2019/03/08 13:47:27 [CRIT] ▶ Could not analyze layer: Clair responded with a failure: Got response 422 with message {"Error":{"Message":"worker: OS and/or package manager are not supported"}}

Maybe Clair has to be updated.

should i log an issue for it on coreos/clair ?

usr42 commented

It still seems to happen with the latest 2.0.7 version of clair. Logging an issue directly on coreos/clair is a good idea.