optiopay / klar

Integration of Clair and Docker Registry
MIT License
505 stars 138 forks source link

klar gives empty Vulnerabilities list with FORMAT_OUTPUT=json or JSON_OUTPUT=true #132

Closed ashageetha closed 5 years ago

ashageetha commented 5 years ago

Installed Klar with latest code (with new option FORMAT_OUTPUT). klar works fine with "FORMAT_OUTPUT=table" or "FORMAT_OUTPUT=standard" option. But with FORMAT_OUTPUT=json or JSON_OUTPUT=true, klar returns empty Vulnerabilities list. Below are the output from klar:

bash-4.2# CLAIR_OUTPUT=High CLAIR_THRESHOLD=10 JSON_OUTPUT=true klar postgres:latest {"LayerCount":14,"Vulnerabilities":{}}

bash-4.2# CLAIR_OUTPUT=High CLAIR_THRESHOLD=10 FORMAT_OUTPUT=json klar postgres:latest {"LayerCount":14,"Vulnerabilities":{}} bash-4.2#

Before the fix for FORMAT_OUTPUT, the klar was working fine with JSON_OUTPUT=true.