mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
* refactor(docker_conf): rename and remove unnecessary options * feat(rpc): define new API * fix(cli): change default timeout * fix(import): fix package names * refactor(vulnerability): remove old mock * refactor(utils): remove un-needed functions * feat(cache): implement cache communicating with a server * refactor(scan): separate scan function as local scanner * test(scanner): add tests for ScanImage * refactor(scan): remove unused options * test(vulnerability): generate mock * refactor(server): split a file * feat(server): implement new RPC server * feat(client): implement new RPC client * fix(cache): use new cache interface * fix(standalone): use new scanner * fix(client): use new scanner * fix(server): pass cache * test(integration): make sure an error is not nil before calling the method * fix(mod): update dependencies * test(integration): ensure the image load finishes * feat(docker): support DOCKER_HOST and DOCKER_CERT_PATH * chore(mod): update dependencies * refactor(rpc): remove old client * feat(server): support old API for backward compatibility * fix(server): check a schema version of JSON cache * fix(rpc): add a version to packages * feat(rpc): add PutImage * test: rename expectations * refactor(cache): rename LayerCache to ImageCache * refactor: rename ImageInfo to ImageReference * fix(applier): pass image_id to ApplyLayer * feat(cache): handle image cache * chore(mod): update dependencies * refactor(server): pass only config * feat(cli): add -removed-pkgs option * refactor(err): wrap errors
244 lines
9.5 KiB
Go
244 lines
9.5 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: rpc/detector/service.proto
|
|
|
|
package detector
|
|
|
|
import (
|
|
fmt "fmt"
|
|
common "github.com/aquasecurity/trivy/rpc/common"
|
|
proto "github.com/golang/protobuf/proto"
|
|
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type OSDetectRequest struct {
|
|
OsFamily string `protobuf:"bytes,1,opt,name=os_family,json=osFamily,proto3" json:"os_family,omitempty"`
|
|
OsName string `protobuf:"bytes,2,opt,name=os_name,json=osName,proto3" json:"os_name,omitempty"`
|
|
Packages []*common.Package `protobuf:"bytes,3,rep,name=packages,proto3" json:"packages,omitempty"`
|
|
ImageName string `protobuf:"bytes,4,opt,name=image_name,json=imageName,proto3" json:"image_name,omitempty"`
|
|
Created *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *OSDetectRequest) Reset() { *m = OSDetectRequest{} }
|
|
func (m *OSDetectRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*OSDetectRequest) ProtoMessage() {}
|
|
func (*OSDetectRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_93e16dbd737b8924, []int{0}
|
|
}
|
|
|
|
func (m *OSDetectRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_OSDetectRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *OSDetectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_OSDetectRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *OSDetectRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_OSDetectRequest.Merge(m, src)
|
|
}
|
|
func (m *OSDetectRequest) XXX_Size() int {
|
|
return xxx_messageInfo_OSDetectRequest.Size(m)
|
|
}
|
|
func (m *OSDetectRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_OSDetectRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_OSDetectRequest proto.InternalMessageInfo
|
|
|
|
func (m *OSDetectRequest) GetOsFamily() string {
|
|
if m != nil {
|
|
return m.OsFamily
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *OSDetectRequest) GetOsName() string {
|
|
if m != nil {
|
|
return m.OsName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *OSDetectRequest) GetPackages() []*common.Package {
|
|
if m != nil {
|
|
return m.Packages
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *OSDetectRequest) GetImageName() string {
|
|
if m != nil {
|
|
return m.ImageName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *OSDetectRequest) GetCreated() *timestamp.Timestamp {
|
|
if m != nil {
|
|
return m.Created
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type DetectResponse struct {
|
|
Vulnerabilities []*common.Vulnerability `protobuf:"bytes,1,rep,name=vulnerabilities,proto3" json:"vulnerabilities,omitempty"`
|
|
Eosl bool `protobuf:"varint,2,opt,name=eosl,proto3" json:"eosl,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DetectResponse) Reset() { *m = DetectResponse{} }
|
|
func (m *DetectResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*DetectResponse) ProtoMessage() {}
|
|
func (*DetectResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_93e16dbd737b8924, []int{1}
|
|
}
|
|
|
|
func (m *DetectResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_DetectResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *DetectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_DetectResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *DetectResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DetectResponse.Merge(m, src)
|
|
}
|
|
func (m *DetectResponse) XXX_Size() int {
|
|
return xxx_messageInfo_DetectResponse.Size(m)
|
|
}
|
|
func (m *DetectResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DetectResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DetectResponse proto.InternalMessageInfo
|
|
|
|
func (m *DetectResponse) GetVulnerabilities() []*common.Vulnerability {
|
|
if m != nil {
|
|
return m.Vulnerabilities
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DetectResponse) GetEosl() bool {
|
|
if m != nil {
|
|
return m.Eosl
|
|
}
|
|
return false
|
|
}
|
|
|
|
type LibDetectRequest struct {
|
|
FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
|
|
Libraries []*common.Library `protobuf:"bytes,2,rep,name=libraries,proto3" json:"libraries,omitempty"`
|
|
ImageName string `protobuf:"bytes,3,opt,name=image_name,json=imageName,proto3" json:"image_name,omitempty"`
|
|
Created *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created,proto3" json:"created,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *LibDetectRequest) Reset() { *m = LibDetectRequest{} }
|
|
func (m *LibDetectRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*LibDetectRequest) ProtoMessage() {}
|
|
func (*LibDetectRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_93e16dbd737b8924, []int{2}
|
|
}
|
|
|
|
func (m *LibDetectRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_LibDetectRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *LibDetectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_LibDetectRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *LibDetectRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_LibDetectRequest.Merge(m, src)
|
|
}
|
|
func (m *LibDetectRequest) XXX_Size() int {
|
|
return xxx_messageInfo_LibDetectRequest.Size(m)
|
|
}
|
|
func (m *LibDetectRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_LibDetectRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_LibDetectRequest proto.InternalMessageInfo
|
|
|
|
func (m *LibDetectRequest) GetFilePath() string {
|
|
if m != nil {
|
|
return m.FilePath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *LibDetectRequest) GetLibraries() []*common.Library {
|
|
if m != nil {
|
|
return m.Libraries
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *LibDetectRequest) GetImageName() string {
|
|
if m != nil {
|
|
return m.ImageName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *LibDetectRequest) GetCreated() *timestamp.Timestamp {
|
|
if m != nil {
|
|
return m.Created
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*OSDetectRequest)(nil), "trivy.detector.OSDetectRequest")
|
|
proto.RegisterType((*DetectResponse)(nil), "trivy.detector.DetectResponse")
|
|
proto.RegisterType((*LibDetectRequest)(nil), "trivy.detector.LibDetectRequest")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("rpc/detector/service.proto", fileDescriptor_93e16dbd737b8924) }
|
|
|
|
var fileDescriptor_93e16dbd737b8924 = []byte{
|
|
// 422 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xd1, 0x8a, 0xd3, 0x40,
|
|
0x14, 0x86, 0xc9, 0xb6, 0x76, 0xdb, 0x53, 0xd8, 0x95, 0x01, 0x31, 0x64, 0xd1, 0x2d, 0xbd, 0xea,
|
|
0xd5, 0x04, 0xbb, 0xe2, 0x03, 0x88, 0x0a, 0xca, 0xa2, 0x4b, 0x14, 0x45, 0x6f, 0xca, 0x64, 0xf6,
|
|
0x34, 0x1d, 0x36, 0xd3, 0x93, 0xce, 0x4c, 0x0a, 0x79, 0x34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