v3: associate feature and namespace with detector

This commit is contained in:
Sida Chen 2018-09-12 16:41:45 -04:00
parent 0609ed964b
commit 9f5d1ea4e1
4 changed files with 312 additions and 167 deletions

View File

@ -9,6 +9,8 @@ It is generated from these files:
It has these top-level messages: It has these top-level messages:
Vulnerability Vulnerability
Detector
Namespace
Feature Feature
Layer Layer
ClairStatus ClairStatus
@ -48,6 +50,30 @@ var _ = math.Inf
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Detector_Type int32
const (
Detector_DETECTOR_TYPE_INVALID Detector_Type = 0
Detector_DETECTOR_TYPE_NAMESPACE Detector_Type = 1
Detector_DETECTOR_TYPE_FEATURE Detector_Type = 2
)
var Detector_Type_name = map[int32]string{
0: "DETECTOR_TYPE_INVALID",
1: "DETECTOR_TYPE_NAMESPACE",
2: "DETECTOR_TYPE_FEATURE",
}
var Detector_Type_value = map[string]int32{
"DETECTOR_TYPE_INVALID": 0,
"DETECTOR_TYPE_NAMESPACE": 1,
"DETECTOR_TYPE_FEATURE": 2,
}
func (x Detector_Type) String() string {
return proto.EnumName(Detector_Type_name, int32(x))
}
func (Detector_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
type Vulnerability struct { type Vulnerability struct {
// The name of the vulnerability. // The name of the vulnerability.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
@ -130,23 +156,88 @@ func (m *Vulnerability) GetAffectedVersions() []*Feature {
return nil return nil
} }
type Detector struct {
// The name of the detector.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The version of the detector.
Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
// The type of the detector.
Type Detector_Type `protobuf:"varint,3,opt,name=type,enum=coreos.clair.Detector_Type" json:"type,omitempty"`
}
func (m *Detector) Reset() { *m = Detector{} }
func (m *Detector) String() string { return proto.CompactTextString(m) }
func (*Detector) ProtoMessage() {}
func (*Detector) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Detector) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Detector) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *Detector) GetType() Detector_Type {
if m != nil {
return m.Type
}
return Detector_DETECTOR_TYPE_INVALID
}
type Namespace struct {
// The name of the namespace.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The detector used to detect the namespace. This only exists when present in
// an Ancestry Feature.
Detector *Detector `protobuf:"bytes,2,opt,name=detector" json:"detector,omitempty"`
}
func (m *Namespace) Reset() { *m = Namespace{} }
func (m *Namespace) String() string { return proto.CompactTextString(m) }
func (*Namespace) ProtoMessage() {}
func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Namespace) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Namespace) GetDetector() *Detector {
if m != nil {
return m.Detector
}
return nil
}
type Feature struct { type Feature struct {
// The name of the feature. // The name of the feature.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The name of the namespace in which the feature is detected. // The namespace in which the feature is detected.
NamespaceName string `protobuf:"bytes,2,opt,name=namespace_name,json=namespaceName" json:"namespace_name,omitempty"` Namespace *Namespace `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"`
// The specific version of this feature. // The specific version of this feature.
Version string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"` Version string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
// The format used to parse version numbers for the feature. // The format used to parse version numbers for the feature.
VersionFormat string `protobuf:"bytes,4,opt,name=version_format,json=versionFormat" json:"version_format,omitempty"` VersionFormat string `protobuf:"bytes,4,opt,name=version_format,json=versionFormat" json:"version_format,omitempty"`
// The detector used to detect this feature. This only exists when present in
// an Ancestry.
Detector *Detector `protobuf:"bytes,5,opt,name=detector" json:"detector,omitempty"`
// The list of vulnerabilities that affect the feature. // The list of vulnerabilities that affect the feature.
Vulnerabilities []*Vulnerability `protobuf:"bytes,5,rep,name=vulnerabilities" json:"vulnerabilities,omitempty"` Vulnerabilities []*Vulnerability `protobuf:"bytes,6,rep,name=vulnerabilities" json:"vulnerabilities,omitempty"`
} }
func (m *Feature) Reset() { *m = Feature{} } func (m *Feature) Reset() { *m = Feature{} }
func (m *Feature) String() string { return proto.CompactTextString(m) } func (m *Feature) String() string { return proto.CompactTextString(m) }
func (*Feature) ProtoMessage() {} func (*Feature) ProtoMessage() {}
func (*Feature) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } func (*Feature) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Feature) GetName() string { func (m *Feature) GetName() string {
if m != nil { if m != nil {
@ -155,11 +246,11 @@ func (m *Feature) GetName() string {
return "" return ""
} }
func (m *Feature) GetNamespaceName() string { func (m *Feature) GetNamespace() *Namespace {
if m != nil { if m != nil {
return m.NamespaceName return m.Namespace
} }
return "" return nil
} }
func (m *Feature) GetVersion() string { func (m *Feature) GetVersion() string {
@ -176,6 +267,13 @@ func (m *Feature) GetVersionFormat() string {
return "" return ""
} }
func (m *Feature) GetDetector() *Detector {
if m != nil {
return m.Detector
}
return nil
}
func (m *Feature) GetVulnerabilities() []*Vulnerability { func (m *Feature) GetVulnerabilities() []*Vulnerability {
if m != nil { if m != nil {
return m.Vulnerabilities return m.Vulnerabilities
@ -191,7 +289,7 @@ type Layer struct {
func (m *Layer) Reset() { *m = Layer{} } func (m *Layer) Reset() { *m = Layer{} }
func (m *Layer) String() string { return proto.CompactTextString(m) } func (m *Layer) String() string { return proto.CompactTextString(m) }
func (*Layer) ProtoMessage() {} func (*Layer) ProtoMessage() {}
func (*Layer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } func (*Layer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *Layer) GetHash() string { func (m *Layer) GetHash() string {
if m != nil { if m != nil {
@ -201,27 +299,18 @@ func (m *Layer) GetHash() string {
} }
type ClairStatus struct { type ClairStatus struct {
// The configured list of feature listers used to scan an ancestry. // The implemented detectors in this Clair instance
Listers []string `protobuf:"bytes,1,rep,name=listers" json:"listers,omitempty"` Detectors []*Detector `protobuf:"bytes,1,rep,name=detectors" json:"detectors,omitempty"`
// The configured list of namespace detectors used to scan an ancestry.
Detectors []string `protobuf:"bytes,2,rep,name=detectors" json:"detectors,omitempty"`
// The time at which the updater last ran. // The time at which the updater last ran.
LastUpdateTime *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=last_update_time,json=lastUpdateTime" json:"last_update_time,omitempty"` LastUpdateTime *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=last_update_time,json=lastUpdateTime" json:"last_update_time,omitempty"`
} }
func (m *ClairStatus) Reset() { *m = ClairStatus{} } func (m *ClairStatus) Reset() { *m = ClairStatus{} }
func (m *ClairStatus) String() string { return proto.CompactTextString(m) } func (m *ClairStatus) String() string { return proto.CompactTextString(m) }
func (*ClairStatus) ProtoMessage() {} func (*ClairStatus) ProtoMessage() {}
func (*ClairStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } func (*ClairStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *ClairStatus) GetListers() []string { func (m *ClairStatus) GetDetectors() []*Detector {
if m != nil {
return m.Listers
}
return nil
}
func (m *ClairStatus) GetDetectors() []string {
if m != nil { if m != nil {
return m.Detectors return m.Detectors
} }
@ -243,7 +332,7 @@ type GetAncestryRequest struct {
func (m *GetAncestryRequest) Reset() { *m = GetAncestryRequest{} } func (m *GetAncestryRequest) Reset() { *m = GetAncestryRequest{} }
func (m *GetAncestryRequest) String() string { return proto.CompactTextString(m) } func (m *GetAncestryRequest) String() string { return proto.CompactTextString(m) }
func (*GetAncestryRequest) ProtoMessage() {} func (*GetAncestryRequest) ProtoMessage() {}
func (*GetAncestryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } func (*GetAncestryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *GetAncestryRequest) GetAncestryName() string { func (m *GetAncestryRequest) GetAncestryName() string {
if m != nil { if m != nil {
@ -262,7 +351,7 @@ type GetAncestryResponse struct {
func (m *GetAncestryResponse) Reset() { *m = GetAncestryResponse{} } func (m *GetAncestryResponse) Reset() { *m = GetAncestryResponse{} }
func (m *GetAncestryResponse) String() string { return proto.CompactTextString(m) } func (m *GetAncestryResponse) String() string { return proto.CompactTextString(m) }
func (*GetAncestryResponse) ProtoMessage() {} func (*GetAncestryResponse) ProtoMessage() {}
func (*GetAncestryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } func (*GetAncestryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetAncestryResponse) GetAncestry() *GetAncestryResponse_Ancestry { func (m *GetAncestryResponse) GetAncestry() *GetAncestryResponse_Ancestry {
if m != nil { if m != nil {
@ -289,7 +378,7 @@ func (m *GetAncestryResponse_AncestryLayer) Reset() { *m = GetAncestryRe
func (m *GetAncestryResponse_AncestryLayer) String() string { return proto.CompactTextString(m) } func (m *GetAncestryResponse_AncestryLayer) String() string { return proto.CompactTextString(m) }
func (*GetAncestryResponse_AncestryLayer) ProtoMessage() {} func (*GetAncestryResponse_AncestryLayer) ProtoMessage() {}
func (*GetAncestryResponse_AncestryLayer) Descriptor() ([]byte, []int) { func (*GetAncestryResponse_AncestryLayer) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{5, 0} return fileDescriptor0, []int{7, 0}
} }
func (m *GetAncestryResponse_AncestryLayer) GetLayer() *Layer { func (m *GetAncestryResponse_AncestryLayer) GetLayer() *Layer {
@ -309,18 +398,17 @@ func (m *GetAncestryResponse_AncestryLayer) GetDetectedFeatures() []*Feature {
type GetAncestryResponse_Ancestry struct { type GetAncestryResponse_Ancestry struct {
// The name of the desired ancestry. // The name of the desired ancestry.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The configured list of feature listers used to scan this ancestry. // The detectors used to scan this Ancestry. It may not be the current set
ScannedListers []string `protobuf:"bytes,4,rep,name=scanned_listers,json=scannedListers" json:"scanned_listers,omitempty"` // of detectors in clair status.
// The configured list of namespace detectors used to scan an ancestry. Detectors []*Detector `protobuf:"bytes,2,rep,name=detectors" json:"detectors,omitempty"`
ScannedDetectors []string `protobuf:"bytes,5,rep,name=scanned_detectors,json=scannedDetectors" json:"scanned_detectors,omitempty"`
// The list of layers along with detected features in each. // The list of layers along with detected features in each.
Layers []*GetAncestryResponse_AncestryLayer `protobuf:"bytes,6,rep,name=layers" json:"layers,omitempty"` Layers []*GetAncestryResponse_AncestryLayer `protobuf:"bytes,3,rep,name=layers" json:"layers,omitempty"`
} }
func (m *GetAncestryResponse_Ancestry) Reset() { *m = GetAncestryResponse_Ancestry{} } func (m *GetAncestryResponse_Ancestry) Reset() { *m = GetAncestryResponse_Ancestry{} }
func (m *GetAncestryResponse_Ancestry) String() string { return proto.CompactTextString(m) } func (m *GetAncestryResponse_Ancestry) String() string { return proto.CompactTextString(m) }
func (*GetAncestryResponse_Ancestry) ProtoMessage() {} func (*GetAncestryResponse_Ancestry) ProtoMessage() {}
func (*GetAncestryResponse_Ancestry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5, 1} } func (*GetAncestryResponse_Ancestry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 1} }
func (m *GetAncestryResponse_Ancestry) GetName() string { func (m *GetAncestryResponse_Ancestry) GetName() string {
if m != nil { if m != nil {
@ -329,16 +417,9 @@ func (m *GetAncestryResponse_Ancestry) GetName() string {
return "" return ""
} }
func (m *GetAncestryResponse_Ancestry) GetScannedListers() []string { func (m *GetAncestryResponse_Ancestry) GetDetectors() []*Detector {
if m != nil { if m != nil {
return m.ScannedListers return m.Detectors
}
return nil
}
func (m *GetAncestryResponse_Ancestry) GetScannedDetectors() []string {
if m != nil {
return m.ScannedDetectors
} }
return nil return nil
} }
@ -364,7 +445,7 @@ type PostAncestryRequest struct {
func (m *PostAncestryRequest) Reset() { *m = PostAncestryRequest{} } func (m *PostAncestryRequest) Reset() { *m = PostAncestryRequest{} }
func (m *PostAncestryRequest) String() string { return proto.CompactTextString(m) } func (m *PostAncestryRequest) String() string { return proto.CompactTextString(m) }
func (*PostAncestryRequest) ProtoMessage() {} func (*PostAncestryRequest) ProtoMessage() {}
func (*PostAncestryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } func (*PostAncestryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *PostAncestryRequest) GetAncestryName() string { func (m *PostAncestryRequest) GetAncestryName() string {
if m != nil { if m != nil {
@ -400,7 +481,7 @@ func (m *PostAncestryRequest_PostLayer) Reset() { *m = PostAncestryReque
func (m *PostAncestryRequest_PostLayer) String() string { return proto.CompactTextString(m) } func (m *PostAncestryRequest_PostLayer) String() string { return proto.CompactTextString(m) }
func (*PostAncestryRequest_PostLayer) ProtoMessage() {} func (*PostAncestryRequest_PostLayer) ProtoMessage() {}
func (*PostAncestryRequest_PostLayer) Descriptor() ([]byte, []int) { func (*PostAncestryRequest_PostLayer) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{6, 0} return fileDescriptor0, []int{8, 0}
} }
func (m *PostAncestryRequest_PostLayer) GetHash() string { func (m *PostAncestryRequest_PostLayer) GetHash() string {
@ -432,7 +513,7 @@ type PostAncestryResponse struct {
func (m *PostAncestryResponse) Reset() { *m = PostAncestryResponse{} } func (m *PostAncestryResponse) Reset() { *m = PostAncestryResponse{} }
func (m *PostAncestryResponse) String() string { return proto.CompactTextString(m) } func (m *PostAncestryResponse) String() string { return proto.CompactTextString(m) }
func (*PostAncestryResponse) ProtoMessage() {} func (*PostAncestryResponse) ProtoMessage() {}
func (*PostAncestryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } func (*PostAncestryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *PostAncestryResponse) GetStatus() *ClairStatus { func (m *PostAncestryResponse) GetStatus() *ClairStatus {
if m != nil { if m != nil {
@ -457,7 +538,7 @@ type GetNotificationRequest struct {
func (m *GetNotificationRequest) Reset() { *m = GetNotificationRequest{} } func (m *GetNotificationRequest) Reset() { *m = GetNotificationRequest{} }
func (m *GetNotificationRequest) String() string { return proto.CompactTextString(m) } func (m *GetNotificationRequest) String() string { return proto.CompactTextString(m) }
func (*GetNotificationRequest) ProtoMessage() {} func (*GetNotificationRequest) ProtoMessage() {}
func (*GetNotificationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } func (*GetNotificationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *GetNotificationRequest) GetOldVulnerabilityPage() string { func (m *GetNotificationRequest) GetOldVulnerabilityPage() string {
if m != nil { if m != nil {
@ -495,7 +576,7 @@ type GetNotificationResponse struct {
func (m *GetNotificationResponse) Reset() { *m = GetNotificationResponse{} } func (m *GetNotificationResponse) Reset() { *m = GetNotificationResponse{} }
func (m *GetNotificationResponse) String() string { return proto.CompactTextString(m) } func (m *GetNotificationResponse) String() string { return proto.CompactTextString(m) }
func (*GetNotificationResponse) ProtoMessage() {} func (*GetNotificationResponse) ProtoMessage() {}
func (*GetNotificationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } func (*GetNotificationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *GetNotificationResponse) GetNotification() *GetNotificationResponse_Notification { func (m *GetNotificationResponse) GetNotification() *GetNotificationResponse_Notification {
if m != nil { if m != nil {
@ -523,7 +604,7 @@ func (m *GetNotificationResponse_Notification) Reset() { *m = GetNotific
func (m *GetNotificationResponse_Notification) String() string { return proto.CompactTextString(m) } func (m *GetNotificationResponse_Notification) String() string { return proto.CompactTextString(m) }
func (*GetNotificationResponse_Notification) ProtoMessage() {} func (*GetNotificationResponse_Notification) ProtoMessage() {}
func (*GetNotificationResponse_Notification) Descriptor() ([]byte, []int) { func (*GetNotificationResponse_Notification) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{9, 0} return fileDescriptor0, []int{11, 0}
} }
func (m *GetNotificationResponse_Notification) GetName() string { func (m *GetNotificationResponse_Notification) GetName() string {
@ -585,7 +666,7 @@ type PagedVulnerableAncestries struct {
func (m *PagedVulnerableAncestries) Reset() { *m = PagedVulnerableAncestries{} } func (m *PagedVulnerableAncestries) Reset() { *m = PagedVulnerableAncestries{} }
func (m *PagedVulnerableAncestries) String() string { return proto.CompactTextString(m) } func (m *PagedVulnerableAncestries) String() string { return proto.CompactTextString(m) }
func (*PagedVulnerableAncestries) ProtoMessage() {} func (*PagedVulnerableAncestries) ProtoMessage() {}
func (*PagedVulnerableAncestries) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (*PagedVulnerableAncestries) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (m *PagedVulnerableAncestries) GetCurrentPage() string { func (m *PagedVulnerableAncestries) GetCurrentPage() string {
if m != nil { if m != nil {
@ -638,7 +719,7 @@ func (m *PagedVulnerableAncestries_IndexedAncestryName) String() string {
} }
func (*PagedVulnerableAncestries_IndexedAncestryName) ProtoMessage() {} func (*PagedVulnerableAncestries_IndexedAncestryName) ProtoMessage() {}
func (*PagedVulnerableAncestries_IndexedAncestryName) Descriptor() ([]byte, []int) { func (*PagedVulnerableAncestries_IndexedAncestryName) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{10, 0} return fileDescriptor0, []int{12, 0}
} }
func (m *PagedVulnerableAncestries_IndexedAncestryName) GetIndex() int32 { func (m *PagedVulnerableAncestries_IndexedAncestryName) GetIndex() int32 {
@ -663,7 +744,7 @@ type MarkNotificationAsReadRequest struct {
func (m *MarkNotificationAsReadRequest) Reset() { *m = MarkNotificationAsReadRequest{} } func (m *MarkNotificationAsReadRequest) Reset() { *m = MarkNotificationAsReadRequest{} }
func (m *MarkNotificationAsReadRequest) String() string { return proto.CompactTextString(m) } func (m *MarkNotificationAsReadRequest) String() string { return proto.CompactTextString(m) }
func (*MarkNotificationAsReadRequest) ProtoMessage() {} func (*MarkNotificationAsReadRequest) ProtoMessage() {}
func (*MarkNotificationAsReadRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } func (*MarkNotificationAsReadRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (m *MarkNotificationAsReadRequest) GetName() string { func (m *MarkNotificationAsReadRequest) GetName() string {
if m != nil { if m != nil {
@ -678,7 +759,7 @@ type MarkNotificationAsReadResponse struct {
func (m *MarkNotificationAsReadResponse) Reset() { *m = MarkNotificationAsReadResponse{} } func (m *MarkNotificationAsReadResponse) Reset() { *m = MarkNotificationAsReadResponse{} }
func (m *MarkNotificationAsReadResponse) String() string { return proto.CompactTextString(m) } func (m *MarkNotificationAsReadResponse) String() string { return proto.CompactTextString(m) }
func (*MarkNotificationAsReadResponse) ProtoMessage() {} func (*MarkNotificationAsReadResponse) ProtoMessage() {}
func (*MarkNotificationAsReadResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (*MarkNotificationAsReadResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
type GetStatusRequest struct { type GetStatusRequest struct {
} }
@ -686,7 +767,7 @@ type GetStatusRequest struct {
func (m *GetStatusRequest) Reset() { *m = GetStatusRequest{} } func (m *GetStatusRequest) Reset() { *m = GetStatusRequest{} }
func (m *GetStatusRequest) String() string { return proto.CompactTextString(m) } func (m *GetStatusRequest) String() string { return proto.CompactTextString(m) }
func (*GetStatusRequest) ProtoMessage() {} func (*GetStatusRequest) ProtoMessage() {}
func (*GetStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (*GetStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
type GetStatusResponse struct { type GetStatusResponse struct {
// The status of the current Clair instance. // The status of the current Clair instance.
@ -696,7 +777,7 @@ type GetStatusResponse struct {
func (m *GetStatusResponse) Reset() { *m = GetStatusResponse{} } func (m *GetStatusResponse) Reset() { *m = GetStatusResponse{} }
func (m *GetStatusResponse) String() string { return proto.CompactTextString(m) } func (m *GetStatusResponse) String() string { return proto.CompactTextString(m) }
func (*GetStatusResponse) ProtoMessage() {} func (*GetStatusResponse) ProtoMessage() {}
func (*GetStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (*GetStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
func (m *GetStatusResponse) GetStatus() *ClairStatus { func (m *GetStatusResponse) GetStatus() *ClairStatus {
if m != nil { if m != nil {
@ -707,6 +788,8 @@ func (m *GetStatusResponse) GetStatus() *ClairStatus {
func init() { func init() {
proto.RegisterType((*Vulnerability)(nil), "coreos.clair.Vulnerability") proto.RegisterType((*Vulnerability)(nil), "coreos.clair.Vulnerability")
proto.RegisterType((*Detector)(nil), "coreos.clair.Detector")
proto.RegisterType((*Namespace)(nil), "coreos.clair.Namespace")
proto.RegisterType((*Feature)(nil), "coreos.clair.Feature") proto.RegisterType((*Feature)(nil), "coreos.clair.Feature")
proto.RegisterType((*Layer)(nil), "coreos.clair.Layer") proto.RegisterType((*Layer)(nil), "coreos.clair.Layer")
proto.RegisterType((*ClairStatus)(nil), "coreos.clair.ClairStatus") proto.RegisterType((*ClairStatus)(nil), "coreos.clair.ClairStatus")
@ -726,6 +809,7 @@ func init() {
proto.RegisterType((*MarkNotificationAsReadResponse)(nil), "coreos.clair.MarkNotificationAsReadResponse") proto.RegisterType((*MarkNotificationAsReadResponse)(nil), "coreos.clair.MarkNotificationAsReadResponse")
proto.RegisterType((*GetStatusRequest)(nil), "coreos.clair.GetStatusRequest") proto.RegisterType((*GetStatusRequest)(nil), "coreos.clair.GetStatusRequest")
proto.RegisterType((*GetStatusResponse)(nil), "coreos.clair.GetStatusResponse") proto.RegisterType((*GetStatusResponse)(nil), "coreos.clair.GetStatusResponse")
proto.RegisterEnum("coreos.clair.Detector_Type", Detector_Type_name, Detector_Type_value)
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -1007,83 +1091,89 @@ var _StatusService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("api/v3/clairpb/clair.proto", fileDescriptor0) } func init() { proto.RegisterFile("api/v3/clairpb/clair.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1237 bytes of a gzipped FileDescriptorProto // 1334 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x4b, 0x6f, 0x1b, 0xd5, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x6f, 0x1b, 0xc5,
0x17, 0xd7, 0xd8, 0x71, 0x1c, 0x1f, 0xdb, 0x49, 0x7a, 0x93, 0xa6, 0x93, 0x49, 0x1f, 0xc9, 0xfc, 0x1b, 0xff, 0xaf, 0x13, 0xc7, 0xf6, 0x63, 0x3b, 0x71, 0x27, 0x69, 0xe2, 0x6c, 0xfe, 0x6d, 0x93,
0xff, 0x55, 0x4b, 0x8b, 0x6c, 0xe1, 0xb2, 0x68, 0xcb, 0x02, 0xa5, 0x8f, 0x84, 0x4a, 0xa5, 0xaa, 0x85, 0x8a, 0x52, 0x90, 0x2d, 0xdc, 0x22, 0xb5, 0xe5, 0x80, 0xdc, 0xc4, 0x09, 0x91, 0xda, 0x10,
0xa6, 0xd0, 0x05, 0x08, 0x59, 0xd7, 0x33, 0xc7, 0xc9, 0x28, 0xe3, 0x19, 0x33, 0xf7, 0xda, 0x89, 0x6d, 0xd2, 0x48, 0x05, 0x21, 0x6b, 0xe2, 0x7d, 0x9c, 0xac, 0xb2, 0xde, 0x5d,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x48,
0xa1, 0x19, 0x61, 0xf2, 0xf1, 0x4d, 0x98, 0xed, 0x79, 0x83, 0xb4, 0x9a, 0xbf, 0xff, 0x59, 0x41,
0xfe, 0x5f, 0xdd, 0x9f, 0x12, 0x1f, 0xa2, 0xf7, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xd1,
0xa1, 0x1f, 0xc8, 0x0e, 0x00, 0x00,
} }

View File

@ -44,17 +44,42 @@ message Vulnerability {
repeated Feature affected_versions = 8; repeated Feature affected_versions = 8;
} }
message Detector {
enum Type {
DETECTOR_TYPE_INVALID = 0;
DETECTOR_TYPE_NAMESPACE = 1;
DETECTOR_TYPE_FEATURE = 2;
}
// The name of the detector.
string name = 1;
// The version of the detector.
string version = 2;
// The type of the detector.
Type type = 3;
}
message Namespace {
// The name of the namespace.
string name = 1;
// The detector used to detect the namespace. This only exists when present in
// an Ancestry Feature.
Detector detector = 2;
}
message Feature { message Feature {
// The name of the feature. // The name of the feature.
string name = 1; string name = 1;
// The name of the namespace in which the feature is detected. // The namespace in which the feature is detected.
string namespace_name = 2; Namespace namespace = 2;
// The specific version of this feature. // The specific version of this feature.
string version = 3; string version = 3;
// The format used to parse version numbers for the feature. // The format used to parse version numbers for the feature.
string version_format = 4; string version_format = 4;
// The detector used to detect this feature. This only exists when present in
// an Ancestry.
Detector detector = 5;
// The list of vulnerabilities that affect the feature. // The list of vulnerabilities that affect the feature.
repeated Vulnerability vulnerabilities = 5; repeated Vulnerability vulnerabilities = 6;
} }
message Layer { message Layer {
@ -77,12 +102,10 @@ service AncestryService {
} }
message ClairStatus { message ClairStatus {
// The configured list of feature listers used to scan an ancestry. // The implemented detectors in this Clair instance
repeated string listers = 1; repeated Detector detectors = 1;
// The configured list of namespace detectors used to scan an ancestry.
repeated string detectors = 2;
// The time at which the updater last ran. // The time at which the updater last ran.
google.protobuf.Timestamp last_update_time = 3; google.protobuf.Timestamp last_update_time = 2;
} }
message GetAncestryRequest { message GetAncestryRequest {
@ -100,12 +123,11 @@ message GetAncestryResponse {
message Ancestry { message Ancestry {
// The name of the desired ancestry. // The name of the desired ancestry.
string name = 1; string name = 1;
// The configured list of feature listers used to scan this ancestry. // The detectors used to scan this Ancestry. It may not be the current set
repeated string scanned_listers = 4; // of detectors in clair status.
// The configured list of namespace detectors used to scan an ancestry. repeated Detector detectors = 2;
repeated string scanned_detectors = 5;
// The list of layers along with detected features in each. // The list of layers along with detected features in each.
repeated AncestryLayer layers = 6; repeated AncestryLayer layers = 3;
} }
// The ancestry requested. // The ancestry requested.
Ancestry ancestry = 1; Ancestry ancestry = 1;

View File

@ -163,19 +163,12 @@
"type": "string", "type": "string",
"description": "The name of the desired ancestry." "description": "The name of the desired ancestry."
}, },
"scanned_listers": { "detectors": {
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "$ref": "#/definitions/clairDetector"
}, },
"description": "The configured list of feature listers used to scan this ancestry." "description": "The detectors used to scan this Ancestry. It may not be the current set\nof detectors in clair status."
},
"scanned_detectors": {
"type": "array",
"items": {
"type": "string"
},
"description": "The configured list of namespace detectors used to scan an ancestry."
}, },
"layers": { "layers": {
"type": "array", "type": "array",
@ -268,19 +261,12 @@
"clairClairStatus": { "clairClairStatus": {
"type": "object", "type": "object",
"properties": { "properties": {
"listers": {
"type": "array",
"items": {
"type": "string"
},
"description": "The configured list of feature listers used to scan an ancestry."
},
"detectors": { "detectors": {
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "$ref": "#/definitions/clairDetector"
}, },
"description": "The configured list of namespace detectors used to scan an ancestry." "title": "The implemented detectors in this Clair instance"
}, },
"last_update_time": { "last_update_time": {
"type": "string", "type": "string",
@ -289,6 +275,32 @@
} }
} }
}, },
"clairDetector": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the detector."
},
"version": {
"type": "string",
"description": "The version of the detector."
},
"type": {
"$ref": "#/definitions/clairDetectorType",
"description": "The type of the detector."
}
}
},
"clairDetectorType": {
"type": "string",
"enum": [
"DETECTOR_TYPE_INVALID",
"DETECTOR_TYPE_NAMESPACE",
"DETECTOR_TYPE_FEATURE"
],
"default": "DETECTOR_TYPE_INVALID"
},
"clairFeature": { "clairFeature": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -296,9 +308,9 @@
"type": "string", "type": "string",
"description": "The name of the feature." "description": "The name of the feature."
}, },
"namespace_name": { "namespace": {
"type": "string", "$ref": "#/definitions/clairNamespace",
"description": "The name of the namespace in which the feature is detected." "description": "The namespace in which the feature is detected."
}, },
"version": { "version": {
"type": "string", "type": "string",
@ -308,6 +320,10 @@
"type": "string", "type": "string",
"description": "The format used to parse version numbers for the feature." "description": "The format used to parse version numbers for the feature."
}, },
"detector": {
"$ref": "#/definitions/clairDetector",
"description": "The detector used to detect this feature. This only exists when present in\nan Ancestry."
},
"vulnerabilities": { "vulnerabilities": {
"type": "array", "type": "array",
"items": { "items": {
@ -360,6 +376,19 @@
"clairMarkNotificationAsReadResponse": { "clairMarkNotificationAsReadResponse": {
"type": "object" "type": "object"
}, },
"clairNamespace": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the namespace."
},
"detector": {
"$ref": "#/definitions/clairDetector",
"description": "The detector used to detect the namespace. This only exists when present in\nan Ancestry Feature."
}
}
},
"clairPagedVulnerableAncestries": { "clairPagedVulnerableAncestries": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -50,7 +50,11 @@ func GetPbAncestryLayer(session database.Session, layer database.AncestryLayer)
return nil, status.Error(codes.Internal, err.Error()) return nil, status.Error(codes.Internal, err.Error())
} }
for _, feature := range features { // NOTE(sidac): It's quite inefficient, but the easiest way to implement
// this feature for now, we should refactor the implementation if there's
// any performance issue. It's expected that the number of features is less
// than 1000.
for _, feature := range affectedFeatures {
if !feature.Valid { if !feature.Valid {
return nil, status.Error(codes.Internal, "ancestry feature is not found") return nil, status.Error(codes.Internal, "ancestry feature is not found")
} }