Broken reports can be generated
In specific cases, broken reports can be generated.
Let's assume we have two images using FROM alpine 3.5: jdel/image1 and jdel/image2
Both images don't have any other common layers.
Running clairctl push jdel/image1 will push layers to clair, including the base alpine:3,5 layer.
Running clairctl report jdel/image1 will generate a valid report for jdel/image1.
Running clairctl report jdel/image2 will generate a broken report for jdel/image2.
Running with debug flag will show 404 errors when getting vulnerabilities for the layers that have been not been pushed, but it will still generate a report.
Workaround: automatically do a push before generating the report.
Fix: generate the report only if no 404 is returned by clair, otherwise, print something in the console