You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause:
Given that ubuntu:latest has empty layers, https://github.com/genuinetools/reg/blob/master/clair/vulns.go#L34
filteredLayers is a dictionary map[int]distribution.Descriptor, but here, it's being used as a list.
When calling NewClairLayer, some indexes are missing because we skipped the empty layers, but since go map defaults to construct the default distribution.Descriptor, the name is empty.
The text was updated successfully, but these errors were encountered:
Repro steps:
reg vulns --clair ubuntu:latest
Actual Result:
2018/12/14 14:17:10 clair.layers.post url=http://127.0.0.1:6050/v1/layers name=
2018/12/14 14:17:10 clair.layers.post req.Body={"Layer":{"Path":"https://quay.io/v2/chris_ricci/wordpress-nginx-php5/blobs/","Format":"Docker"}}
2018/12/14 14:17:10 clair.layers.post resp.Status=400 Bad Request
clair error: could not process a layer which does not have a name
Root cause:
Given that ubuntu:latest has empty layers,
https://github.com/genuinetools/reg/blob/master/clair/vulns.go#L34
filteredLayers is a dictionary
map[int]distribution.Descriptor
, but here, it's being used as a list.When calling NewClairLayer, some indexes are missing because we skipped the empty layers, but since go map defaults to construct the default
distribution.Descriptor
, the name is empty.The text was updated successfully, but these errors were encountered: