diff --git a/cmd/aqua/main.go b/cmd/aqua/main.go index a5b64c44..5bb69169 100644 --- a/cmd/aqua/main.go +++ b/cmd/aqua/main.go @@ -41,11 +41,6 @@ func main() { Usage: "Add this flag if you want test failed policy locally before sending PR", EnvVars: []string{"TRIVY_SKIP_RESULT_UPLOAD"}, }, - &cli.BoolFlag{ - Name: "pr-scan", - Usage: "Add this flag if you want scan only PR diff", - EnvVars: []string{"TRIVY_PR_SCAN"}, - }, &cli.BoolFlag{ Name: "skip-policy-exit-code", Usage: "Add this flag if you want skip policies exit code", @@ -65,6 +60,11 @@ func main() { EnvVars: []string{"TRIVY_SECURITY_CHECKS"}, Hidden: true, }, + &cli.StringFlag{ + Name: "triggered-by", + Usage: "Add this flag to determine where the scan is coming from (push, pr, offline)", + EnvVars: []string{"TRIGGERED_BY"}, + }, ) fsCmd := commands.NewFilesystemCommand() @@ -75,11 +75,6 @@ func main() { Usage: "Add this flag if you want test failed policy locally before sending PR", EnvVars: []string{"TRIVY_SKIP_RESULT_UPLOAD"}, }, - &cli.BoolFlag{ - Name: "pr-scan", - Usage: "Add this flag if you want scan only PR diff", - EnvVars: []string{"TRIVY_PR_SCAN"}, - }, &cli.BoolFlag{ Name: "skip-policy-exit-code", Usage: "Add this flag if you want skip policies exit code", @@ -90,6 +85,11 @@ func main() { Usage: "Add this flag if you want run in debug mode", EnvVars: []string{"DEBUG"}, }, + &cli.StringFlag{ + Name: "triggered-by", + Usage: "Add this flag to determine where the scan is coming from (push, pr, offline)", + EnvVars: []string{"TRIGGERED_BY"}, + }, ) imageCmd := commands.NewImageCommand() @@ -131,6 +131,11 @@ func runScan(c *cli.Context) error { return err } } + if c.String("triggered-by") != "" { + if err := c.Set("triggered-by", strings.ToUpper(c.String("triggered-by"))); err != nil { + return err + } + } debug := c.Bool("debug") @@ -169,7 +174,7 @@ func runScan(c *cli.Context) error { return err } - if c.Bool("pr-scan") { + if c.String("triggered-by") == "PR" { results, err = processor.PrDiffResults(results) if err != nil { return err diff --git a/pkg/buildClient/upload.go b/pkg/buildClient/upload.go index bd8bc632..fa7975c9 100644 --- a/pkg/buildClient/upload.go +++ b/pkg/buildClient/upload.go @@ -4,6 +4,8 @@ import ( "fmt" "net/http" + "github.com/aquasecurity/trivy-plugin-aqua/pkg/scanner" + "github.com/aquasecurity/trivy-plugin-aqua/pkg/metadata" "github.com/aquasecurity/trivy-plugin-aqua/pkg/proto/buildsecurity" ) @@ -33,6 +35,7 @@ func (bc *TwirpClient) Upload(results []*buildsecurity.Result, tags map[string]s Commit: commitId, System: buildSystem, Tags: tags, + TriggeredBy: scanner.MatchTriggeredBy(bc.c.String("triggered-by")), } _, err = client.CreateScan(ctx, createScanReq) diff --git a/pkg/proto/buildsecurity.proto b/pkg/proto/buildsecurity.proto index b2cb5beb..a1aac484 100644 --- a/pkg/proto/buildsecurity.proto +++ b/pkg/proto/buildsecurity.proto @@ -43,6 +43,14 @@ message CreateScanReq { string Commit = 5; repeated Result Results = 7; map Tags = 8; + TriggeredByEnum TriggeredBy = 9; +} + +enum TriggeredByEnum { + TRIGGERED_BY_UNKNOWN = 0; + TRIGGERED_BY_PUSH = 1; + TRIGGERED_BY_PR = 2; + TRIGGERED_BY_OFFLINE = 3; } message CreateScanResp { diff --git a/pkg/proto/buildsecurity/buildsecurity.pb.go b/pkg/proto/buildsecurity/buildsecurity.pb.go index ff4bb629..2ed697a8 100644 --- a/pkg/proto/buildsecurity/buildsecurity.pb.go +++ b/pkg/proto/buildsecurity/buildsecurity.pb.go @@ -20,6 +20,58 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type TriggeredByEnum int32 + +const ( + TriggeredByEnum_TRIGGERED_BY_UNKNOWN TriggeredByEnum = 0 + TriggeredByEnum_TRIGGERED_BY_PUSH TriggeredByEnum = 1 + TriggeredByEnum_TRIGGERED_BY_PR TriggeredByEnum = 2 + TriggeredByEnum_TRIGGERED_BY_OFFLINE TriggeredByEnum = 3 +) + +// Enum value maps for TriggeredByEnum. +var ( + TriggeredByEnum_name = map[int32]string{ + 0: "TRIGGERED_BY_UNKNOWN", + 1: "TRIGGERED_BY_PUSH", + 2: "TRIGGERED_BY_PR", + 3: "TRIGGERED_BY_OFFLINE", + } + TriggeredByEnum_value = map[string]int32{ + "TRIGGERED_BY_UNKNOWN": 0, + "TRIGGERED_BY_PUSH": 1, + "TRIGGERED_BY_PR": 2, + "TRIGGERED_BY_OFFLINE": 3, + } +) + +func (x TriggeredByEnum) Enum() *TriggeredByEnum { + p := new(TriggeredByEnum) + *p = x + return p +} + +func (x TriggeredByEnum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TriggeredByEnum) Descriptor() protoreflect.EnumDescriptor { + return file_buildsecurity_proto_enumTypes[0].Descriptor() +} + +func (TriggeredByEnum) Type() protoreflect.EnumType { + return &file_buildsecurity_proto_enumTypes[0] +} + +func (x TriggeredByEnum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TriggeredByEnum.Descriptor instead. +func (TriggeredByEnum) EnumDescriptor() ([]byte, []int) { + return file_buildsecurity_proto_rawDescGZIP(), []int{0} +} + type SeverityEnum int32 const ( @@ -62,11 +114,11 @@ func (x SeverityEnum) String() string { } func (SeverityEnum) Descriptor() protoreflect.EnumDescriptor { - return file_buildsecurity_proto_enumTypes[0].Descriptor() + return file_buildsecurity_proto_enumTypes[1].Descriptor() } func (SeverityEnum) Type() protoreflect.EnumType { - return &file_buildsecurity_proto_enumTypes[0] + return &file_buildsecurity_proto_enumTypes[1] } func (x SeverityEnum) Number() protoreflect.EnumNumber { @@ -75,7 +127,7 @@ func (x SeverityEnum) Number() protoreflect.EnumNumber { // Deprecated: Use SeverityEnum.Descriptor instead. func (SeverityEnum) EnumDescriptor() ([]byte, []int) { - return file_buildsecurity_proto_rawDescGZIP(), []int{0} + return file_buildsecurity_proto_rawDescGZIP(), []int{1} } type PolicyTypeEnum int32 @@ -108,11 +160,11 @@ func (x PolicyTypeEnum) String() string { } func (PolicyTypeEnum) Descriptor() protoreflect.EnumDescriptor { - return file_buildsecurity_proto_enumTypes[1].Descriptor() + return file_buildsecurity_proto_enumTypes[2].Descriptor() } func (PolicyTypeEnum) Type() protoreflect.EnumType { - return &file_buildsecurity_proto_enumTypes[1] + return &file_buildsecurity_proto_enumTypes[2] } func (x PolicyTypeEnum) Number() protoreflect.EnumNumber { @@ -121,7 +173,7 @@ func (x PolicyTypeEnum) Number() protoreflect.EnumNumber { // Deprecated: Use PolicyTypeEnum.Descriptor instead. func (PolicyTypeEnum) EnumDescriptor() ([]byte, []int) { - return file_buildsecurity_proto_rawDescGZIP(), []int{1} + return file_buildsecurity_proto_rawDescGZIP(), []int{2} } type Result_TypeEnum int32 @@ -172,11 +224,11 @@ func (x Result_TypeEnum) String() string { } func (Result_TypeEnum) Descriptor() protoreflect.EnumDescriptor { - return file_buildsecurity_proto_enumTypes[2].Descriptor() + return file_buildsecurity_proto_enumTypes[3].Descriptor() } func (Result_TypeEnum) Type() protoreflect.EnumType { - return &file_buildsecurity_proto_enumTypes[2] + return &file_buildsecurity_proto_enumTypes[3] } func (x Result_TypeEnum) Number() protoreflect.EnumNumber { @@ -498,6 +550,7 @@ type CreateScanReq struct { Commit string `protobuf:"bytes,5,opt,name=Commit,proto3" json:"Commit,omitempty"` Results []*Result `protobuf:"bytes,7,rep,name=Results,proto3" json:"Results,omitempty"` Tags map[string]string `protobuf:"bytes,8,rep,name=Tags,proto3" json:"Tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TriggeredBy TriggeredByEnum `protobuf:"varint,9,opt,name=TriggeredBy,proto3,enum=buildsecurity.TriggeredByEnum" json:"TriggeredBy,omitempty"` } func (x *CreateScanReq) Reset() { @@ -581,6 +634,13 @@ func (x *CreateScanReq) GetTags() map[string]string { return nil } +func (x *CreateScanReq) GetTriggeredBy() TriggeredByEnum { + if x != nil { + return x.TriggeredBy + } + return TriggeredByEnum_TRIGGERED_BY_UNKNOWN +} + type CreateScanResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1131,7 +1191,7 @@ var file_buildsecurity_proto_rawDesc = []byte{ 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0xb5, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0xf7, 0x02, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, @@ -1147,143 +1207,154 @@ var file_buildsecurity_proto_rawDesc = []byte{ 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x54, 0x61, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, - 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x63, 0x61, 0x6e, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x63, 0x61, 0x6e, 0x49, 0x44, - 0x22, 0xb9, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x45, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x52, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, 0x3d, 0x0a, - 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, - 0x52, 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x96, 0x01, 0x0a, - 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x1a, - 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x56, 0x44, 0x49, 0x44, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x41, 0x56, 0x44, 0x49, 0x44, 0x73, 0x12, 0x37, 0x0a, 0x08, - 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x53, - 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, 0x53, 0x65, 0x76, - 0x65, 0x72, 0x69, 0x74, 0x79, 0x22, 0x76, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, - 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xd9, 0x06, - 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x56, 0x44, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x56, 0x44, 0x49, 0x44, 0x12, 0x18, - 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x54, 0x79, - 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x08, - 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x53, - 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, 0x53, 0x65, 0x76, - 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x46, - 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, - 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x45, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x50, 0x6b, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x50, 0x6b, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x56, 0x65, 0x6e, 0x64, - 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, - 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x56, - 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x24, 0x0a, 0x0d, - 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x44, - 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x73, 0x74, - 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, - 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xaa, 0x01, 0x0a, - 0x08, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x52, 0x52, 0x41, 0x46, 0x4f, 0x52, 0x4d, 0x10, 0x01, 0x12, - 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x46, 0x4f, 0x52, - 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x13, 0x0a, - 0x0f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x55, 0x42, 0x45, 0x52, 0x4e, 0x45, 0x54, 0x45, 0x53, - 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x59, 0x41, 0x4d, 0x4c, 0x10, - 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x43, 0x4c, 0x10, 0x06, 0x12, - 0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x55, 0x4c, 0x4e, 0x45, 0x52, 0x41, 0x42, - 0x49, 0x4c, 0x49, 0x54, 0x49, 0x45, 0x53, 0x10, 0x07, 0x22, 0x9b, 0x01, 0x0a, 0x0d, 0x56, 0x65, - 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x76, - 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x56, - 0x32, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x56, 0x32, - 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x56, 0x32, 0x56, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x56, 0x32, 0x56, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x33, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x02, 0x52, 0x07, 0x56, 0x33, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x56, - 0x33, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x56, - 0x33, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2a, 0x87, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x76, 0x65, - 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x56, 0x45, - 0x52, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x01, - 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x44, - 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, - 0x59, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x56, 0x45, - 0x52, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x04, 0x12, - 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x41, 0x58, 0x10, - 0x05, 0x2a, 0x45, 0x0a, 0x0e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x50, - 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x52, - 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x32, 0xe2, 0x02, 0x0a, 0x0d, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x5b, 0x0a, 0x10, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x22, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x22, 0x2e, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, - 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, + 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x40, 0x0a, + 0x0b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x45, 0x6e, + 0x75, 0x6d, 0x52, 0x0b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x1a, + 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x63, + 0x61, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x63, 0x61, 0x6e, + 0x49, 0x44, 0x22, 0xb9, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, + 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x6e, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x45, 0x6e, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, + 0x3d, 0x0a, 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, + 0x75, 0x6d, 0x52, 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x96, + 0x01, 0x0a, 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x56, 0x44, 0x49, 0x44, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x41, 0x56, 0x44, 0x49, 0x44, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, 0x53, + 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x22, 0x76, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, + 0xd9, 0x06, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x56, + 0x44, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x56, 0x44, 0x49, 0x44, + 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, + 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, 0x53, + 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x64, 0x4c, 0x69, + 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x45, 0x6e, 0x64, 0x4c, 0x69, 0x6e, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x41, 0x0a, + 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x0b, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x0d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x50, 0x6b, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x50, 0x6b, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x46, 0x69, + 0x78, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x56, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x10, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x2e, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x0d, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x24, + 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, + 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xaa, + 0x01, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x0c, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, + 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x52, 0x52, 0x41, 0x46, 0x4f, 0x52, 0x4d, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x46, + 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, + 0x13, 0x0a, 0x0f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x55, 0x42, 0x45, 0x52, 0x4e, 0x45, 0x54, + 0x45, 0x53, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x59, 0x41, 0x4d, + 0x4c, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x43, 0x4c, 0x10, + 0x06, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x55, 0x4c, 0x4e, 0x45, 0x52, + 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x49, 0x45, 0x53, 0x10, 0x07, 0x22, 0x9b, 0x01, 0x0a, 0x0d, + 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, + 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x56, 0x32, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, + 0x56, 0x32, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x56, 0x32, 0x56, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x56, 0x32, 0x56, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x33, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x56, 0x33, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x56, 0x33, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x56, 0x33, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2a, 0x71, 0x0a, 0x0f, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x65, 0x64, 0x42, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x14, + 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, + 0x52, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x10, 0x01, 0x12, 0x13, 0x0a, + 0x0f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x50, 0x52, + 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, 0x5f, + 0x42, 0x59, 0x5f, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x03, 0x2a, 0x87, 0x01, 0x0a, + 0x0c, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, + 0x10, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, 0x5f, + 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, + 0x59, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, + 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x03, 0x12, 0x15, 0x0a, + 0x11, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, + 0x41, 0x4c, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, 0x59, + 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x05, 0x2a, 0x45, 0x0a, 0x0e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x4f, 0x4c, 0x49, + 0x43, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x00, + 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x55, 0x50, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x32, 0xe2, 0x02, + 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x5b, 0x0a, 0x10, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, - 0x12, 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1d, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x10, 0x5a, - 0x0e, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0b, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x63, 0x61, 0x6e, 0x12, 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, + 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1298,51 +1369,53 @@ func file_buildsecurity_proto_rawDescGZIP() []byte { return file_buildsecurity_proto_rawDescData } -var file_buildsecurity_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_buildsecurity_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_buildsecurity_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_buildsecurity_proto_goTypes = []interface{}{ - (SeverityEnum)(0), // 0: buildsecurity.SeverityEnum - (PolicyTypeEnum)(0), // 1: buildsecurity.PolicyTypeEnum - (Result_TypeEnum)(0), // 2: buildsecurity.Result.TypeEnum - (*LookupRepositoryReq)(nil), // 3: buildsecurity.LookupRepositoryReq - (*LookupRepositoryResp)(nil), // 4: buildsecurity.LookupRepositoryResp - (*CreateRepositoryReq)(nil), // 5: buildsecurity.CreateRepositoryReq - (*CreateRepositoryResp)(nil), // 6: buildsecurity.CreateRepositoryResp - (*GetPoliciesReq)(nil), // 7: buildsecurity.GetPoliciesReq - (*GetPoliciesResp)(nil), // 8: buildsecurity.GetPoliciesResp - (*CreateScanReq)(nil), // 9: buildsecurity.CreateScanReq - (*CreateScanResp)(nil), // 10: buildsecurity.CreateScanResp - (*Policy)(nil), // 11: buildsecurity.Policy - (*PolicyControl)(nil), // 12: buildsecurity.PolicyControl - (*PolicyResult)(nil), // 13: buildsecurity.PolicyResult - (*Result)(nil), // 14: buildsecurity.Result - (*VendorScoring)(nil), // 15: buildsecurity.VendorScoring - nil, // 16: buildsecurity.CreateScanReq.TagsEntry + (TriggeredByEnum)(0), // 0: buildsecurity.TriggeredByEnum + (SeverityEnum)(0), // 1: buildsecurity.SeverityEnum + (PolicyTypeEnum)(0), // 2: buildsecurity.PolicyTypeEnum + (Result_TypeEnum)(0), // 3: buildsecurity.Result.TypeEnum + (*LookupRepositoryReq)(nil), // 4: buildsecurity.LookupRepositoryReq + (*LookupRepositoryResp)(nil), // 5: buildsecurity.LookupRepositoryResp + (*CreateRepositoryReq)(nil), // 6: buildsecurity.CreateRepositoryReq + (*CreateRepositoryResp)(nil), // 7: buildsecurity.CreateRepositoryResp + (*GetPoliciesReq)(nil), // 8: buildsecurity.GetPoliciesReq + (*GetPoliciesResp)(nil), // 9: buildsecurity.GetPoliciesResp + (*CreateScanReq)(nil), // 10: buildsecurity.CreateScanReq + (*CreateScanResp)(nil), // 11: buildsecurity.CreateScanResp + (*Policy)(nil), // 12: buildsecurity.Policy + (*PolicyControl)(nil), // 13: buildsecurity.PolicyControl + (*PolicyResult)(nil), // 14: buildsecurity.PolicyResult + (*Result)(nil), // 15: buildsecurity.Result + (*VendorScoring)(nil), // 16: buildsecurity.VendorScoring + nil, // 17: buildsecurity.CreateScanReq.TagsEntry } var file_buildsecurity_proto_depIdxs = []int32{ - 11, // 0: buildsecurity.GetPoliciesResp.Policies:type_name -> buildsecurity.Policy - 14, // 1: buildsecurity.CreateScanReq.Results:type_name -> buildsecurity.Result - 16, // 2: buildsecurity.CreateScanReq.Tags:type_name -> buildsecurity.CreateScanReq.TagsEntry - 12, // 3: buildsecurity.Policy.Controls:type_name -> buildsecurity.PolicyControl - 1, // 4: buildsecurity.Policy.PolicyType:type_name -> buildsecurity.PolicyTypeEnum - 0, // 5: buildsecurity.PolicyControl.Severity:type_name -> buildsecurity.SeverityEnum - 2, // 6: buildsecurity.Result.Type:type_name -> buildsecurity.Result.TypeEnum - 0, // 7: buildsecurity.Result.Severity:type_name -> buildsecurity.SeverityEnum - 13, // 8: buildsecurity.Result.PolicyResults:type_name -> buildsecurity.PolicyResult - 15, // 9: buildsecurity.Result.VendorScoring:type_name -> buildsecurity.VendorScoring - 3, // 10: buildsecurity.BuildSecurity.LookupRepository:input_type -> buildsecurity.LookupRepositoryReq - 5, // 11: buildsecurity.BuildSecurity.CreateRepository:input_type -> buildsecurity.CreateRepositoryReq - 7, // 12: buildsecurity.BuildSecurity.GetPolicies:input_type -> buildsecurity.GetPoliciesReq - 9, // 13: buildsecurity.BuildSecurity.CreateScan:input_type -> buildsecurity.CreateScanReq - 4, // 14: buildsecurity.BuildSecurity.LookupRepository:output_type -> buildsecurity.LookupRepositoryResp - 6, // 15: buildsecurity.BuildSecurity.CreateRepository:output_type -> buildsecurity.CreateRepositoryResp - 8, // 16: buildsecurity.BuildSecurity.GetPolicies:output_type -> buildsecurity.GetPoliciesResp - 10, // 17: buildsecurity.BuildSecurity.CreateScan:output_type -> buildsecurity.CreateScanResp - 14, // [14:18] is the sub-list for method output_type - 10, // [10:14] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 12, // 0: buildsecurity.GetPoliciesResp.Policies:type_name -> buildsecurity.Policy + 15, // 1: buildsecurity.CreateScanReq.Results:type_name -> buildsecurity.Result + 17, // 2: buildsecurity.CreateScanReq.Tags:type_name -> buildsecurity.CreateScanReq.TagsEntry + 0, // 3: buildsecurity.CreateScanReq.TriggeredBy:type_name -> buildsecurity.TriggeredByEnum + 13, // 4: buildsecurity.Policy.Controls:type_name -> buildsecurity.PolicyControl + 2, // 5: buildsecurity.Policy.PolicyType:type_name -> buildsecurity.PolicyTypeEnum + 1, // 6: buildsecurity.PolicyControl.Severity:type_name -> buildsecurity.SeverityEnum + 3, // 7: buildsecurity.Result.Type:type_name -> buildsecurity.Result.TypeEnum + 1, // 8: buildsecurity.Result.Severity:type_name -> buildsecurity.SeverityEnum + 14, // 9: buildsecurity.Result.PolicyResults:type_name -> buildsecurity.PolicyResult + 16, // 10: buildsecurity.Result.VendorScoring:type_name -> buildsecurity.VendorScoring + 4, // 11: buildsecurity.BuildSecurity.LookupRepository:input_type -> buildsecurity.LookupRepositoryReq + 6, // 12: buildsecurity.BuildSecurity.CreateRepository:input_type -> buildsecurity.CreateRepositoryReq + 8, // 13: buildsecurity.BuildSecurity.GetPolicies:input_type -> buildsecurity.GetPoliciesReq + 10, // 14: buildsecurity.BuildSecurity.CreateScan:input_type -> buildsecurity.CreateScanReq + 5, // 15: buildsecurity.BuildSecurity.LookupRepository:output_type -> buildsecurity.LookupRepositoryResp + 7, // 16: buildsecurity.BuildSecurity.CreateRepository:output_type -> buildsecurity.CreateRepositoryResp + 9, // 17: buildsecurity.BuildSecurity.GetPolicies:output_type -> buildsecurity.GetPoliciesResp + 11, // 18: buildsecurity.BuildSecurity.CreateScan:output_type -> buildsecurity.CreateScanResp + 15, // [15:19] is the sub-list for method output_type + 11, // [11:15] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_buildsecurity_proto_init() } @@ -1513,7 +1586,7 @@ func file_buildsecurity_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_buildsecurity_proto_rawDesc, - NumEnums: 3, + NumEnums: 4, NumMessages: 14, NumExtensions: 0, NumServices: 1, diff --git a/pkg/proto/buildsecurity/buildsecurity.twirp.go b/pkg/proto/buildsecurity/buildsecurity.twirp.go index 6f6ca4b5..39d54c67 100644 --- a/pkg/proto/buildsecurity/buildsecurity.twirp.go +++ b/pkg/proto/buildsecurity/buildsecurity.twirp.go @@ -1922,77 +1922,82 @@ func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error) } var twirpFileDescriptor0 = []byte{ - // 1150 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdb, 0x6e, 0xdb, 0x46, - 0x13, 0x0e, 0x75, 0xb2, 0x34, 0x91, 0xe4, 0xf5, 0xca, 0x71, 0x08, 0xdb, 0x31, 0x0c, 0xfe, 0x3f, - 0x0a, 0xc3, 0x05, 0x1c, 0x54, 0xbe, 0x48, 0x60, 0xa0, 0x28, 0x74, 0xa0, 0x63, 0xc2, 0xd4, 0x01, - 0x4b, 0x49, 0xa9, 0xdb, 0x8b, 0x80, 0x96, 0x36, 0x0e, 0x61, 0x99, 0x64, 0xb9, 0x94, 0x50, 0x3d, - 0x41, 0xdf, 0xa0, 0x37, 0x7d, 0x83, 0xde, 0xf7, 0xa2, 0x8f, 0xd2, 0xdb, 0x3e, 0x49, 0xb1, 0xbb, - 0x24, 0x25, 0xca, 0x82, 0x9b, 0xb6, 0x77, 0xfc, 0xbe, 0xf9, 0x66, 0x66, 0x67, 0x76, 0x76, 0xb9, - 0x50, 0xbb, 0x9d, 0x39, 0xd3, 0x09, 0xa3, 0xe3, 0x59, 0xe0, 0x84, 0x8b, 0x33, 0x3f, 0xf0, 0x42, - 0x0f, 0x57, 0x52, 0xa4, 0xf6, 0x25, 0xd4, 0x4c, 0xcf, 0xbb, 0x9f, 0xf9, 0x84, 0xfa, 0x1e, 0x73, - 0x42, 0x2f, 0x58, 0x10, 0xfa, 0x03, 0xde, 0x85, 0xbc, 0xd5, 0xea, 0x18, 0x6d, 0x55, 0x39, 0x56, - 0x4e, 0x4a, 0x44, 0x02, 0xed, 0x02, 0x76, 0x1f, 0x8b, 0x99, 0x8f, 0x35, 0x28, 0x2f, 0x19, 0xa3, - 0xad, 0x66, 0x84, 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, 0x98, 0xdb, 0xd3, 0x59, 0x3c, 0x02, - 0x12, 0x5c, 0x64, 0xde, 0x2a, 0xda, 0x09, 0x54, 0x57, 0x23, 0x33, 0x5f, 0xd4, 0x39, 0xb6, 0xdd, - 0xa4, 0x63, 0x11, 0xd2, 0x7e, 0x57, 0xa0, 0x20, 0xdb, 0x8e, 0xf7, 0xa3, 0xfd, 0x59, 0xb6, 0x35, - 0xc1, 0xdc, 0xa6, 0xbb, 0x1f, 0xbd, 0x60, 0x4c, 0x27, 0x22, 0x5b, 0x91, 0x24, 0x18, 0xbf, 0x85, - 0x62, 0xcb, 0x73, 0xc3, 0xc0, 0x9b, 0x32, 0x35, 0x2b, 0xaa, 0x3c, 0xdc, 0xb8, 0xaf, 0x91, 0x88, - 0x24, 0x6a, 0xfc, 0x35, 0x80, 0x34, 0x0d, 0x16, 0x3e, 0x15, 0x1b, 0x50, 0xad, 0xbf, 0xda, 0xe8, - 0xcb, 0x05, 0xba, 0x3b, 0x7b, 0x20, 0x2b, 0x0e, 0xda, 0xcf, 0x0a, 0x54, 0x52, 0xa1, 0x45, 0x09, - 0x81, 0x37, 0x77, 0x26, 0x34, 0x48, 0x4a, 0x88, 0x30, 0x56, 0x61, 0xcb, 0xa2, 0xc1, 0xdc, 0x19, - 0xc7, 0xfd, 0x8a, 0x21, 0xef, 0x4d, 0x63, 0xd4, 0x36, 0xda, 0x72, 0xf9, 0x25, 0x12, 0x21, 0xfc, - 0x06, 0x8a, 0x16, 0x9d, 0x53, 0xbe, 0x8c, 0x68, 0x71, 0x07, 0x6b, 0x8b, 0x8b, 0xcd, 0x62, 0x69, - 0x89, 0x58, 0x9b, 0x43, 0x39, 0x1a, 0x65, 0x31, 0x04, 0xff, 0xba, 0xb3, 0x7b, 0x50, 0xb8, 0xb4, - 0x9d, 0x29, 0x9d, 0x88, 0x91, 0x2d, 0x92, 0x08, 0x71, 0x9e, 0x50, 0x9b, 0x79, 0x6e, 0x3c, 0xb4, - 0x12, 0x69, 0x7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xfa, 0xc3, 0xe9, 0x51, 0xf0, 0x0d, 0x4f, 0xb3, 0x47, 0xc1, - 0x37, 0xbe, 0xbe, 0x4c, 0x78, 0xbe, 0xf2, 0x16, 0xc2, 0xeb, 0x7f, 0xb8, 0xf4, 0xab, 0x6b, 0xff, - 0xe8, 0x29, 0x33, 0xf3, 0xb1, 0x01, 0xb0, 0xfc, 0xb7, 0xe3, 0xc3, 0xa7, 0x1e, 0x14, 0xfb, 0xaf, - 0x9e, 0xb0, 0x32, 0xbf, 0x89, 0xbe, 0xab, 0xbe, 0x4e, 0x09, 0x6e, 0x0b, 0xe2, 0x01, 0x7c, 0xfe, - 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x2e, 0xeb, 0x79, 0x17, 0x0b, 0x00, 0x00, + // 1220 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5b, 0x6e, 0xdb, 0x46, + 0x17, 0x0e, 0x75, 0xb3, 0x74, 0x2c, 0xc9, 0x93, 0xb1, 0x93, 0x10, 0x4e, 0x62, 0x18, 0xfc, 0x7f, + 0x14, 0x86, 0x0b, 0x38, 0xa8, 0xfc, 0x90, 0x20, 0x40, 0xd1, 0x4a, 0x22, 0x65, 0x13, 0xa1, 0x2e, + 0x18, 0x4a, 0x4a, 0xdd, 0x3e, 0x04, 0x8c, 0x34, 0x71, 0x88, 0xc8, 0x24, 0xc3, 0xa1, 0x8c, 0x6a, + 0x05, 0xdd, 0x41, 0x5f, 0xba, 0x83, 0xee, 0xa0, 0x4b, 0xe9, 0x6b, 0x37, 0xd1, 0xd7, 0x62, 0x66, + 0x48, 0x9a, 0x94, 0x84, 0x34, 0x6d, 0xdf, 0xf8, 0x7d, 0xe7, 0x3b, 0x97, 0x39, 0x73, 0x66, 0x38, + 0xb0, 0xff, 0x76, 0xe9, 0x2e, 0xe6, 0x8c, 0xce, 0x96, 0xa1, 0x1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c, + 0xe0, 0x6d, 0x45, 0xbc, 0xda, 0xcf, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x2e, 0x84, 0xd5, 0x39, + 0xcc, 0x0b, 0x00, 0x00, } diff --git a/pkg/scanner/scanner.go b/pkg/scanner/scanner.go index 56d40517..04866feb 100644 --- a/pkg/scanner/scanner.go +++ b/pkg/scanner/scanner.go @@ -39,7 +39,7 @@ func Scan(c *cli.Context, path string) (report.Results, error) { case "image": initializeScanner = initializeDockerScanner(path) default: - if c.Bool("pr-scan") { + if c.String("triggered-by") == "PR" { err := createDiffScanFs() if err != nil { return nil, errors.Wrap(err, "failed create diff scan system") @@ -162,3 +162,9 @@ func MatchResultType(resultType string) buildsecurity.Result_TypeEnum { index := buildsecurity.Result_TypeEnum_value[resultType] return buildsecurity.Result_TypeEnum(index) } + +func MatchTriggeredBy(triggeredBy string) buildsecurity.TriggeredByEnum { + triggeredBy = fmt.Sprintf("TRIGGERED_BY_%s", triggeredBy) + index := buildsecurity.TriggeredByEnum_value[triggeredBy] + return buildsecurity.TriggeredByEnum(index) +}