-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathcnspec_policy.pb.go
8319 lines (7390 loc) · 341 KB
/
cnspec_policy.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.5
// protoc v5.29.3
// source: cnspec_policy.proto
package policy
import (
explorer "go.mondoo.com/cnquery/v11/explorer"
resources "go.mondoo.com/cnquery/v11/explorer/resources"
llx "go.mondoo.com/cnquery/v11/llx"
inventory "go.mondoo.com/cnquery/v11/providers-sdk/v1/inventory"
mvd "go.mondoo.com/cnquery/v11/providers-sdk/v1/upstream/mvd"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GroupType int32
const (
GroupType_UNCATEGORIZED GroupType = 0
GroupType_CHAPTER GroupType = 1
GroupType_IMPORT GroupType = 2
GroupType_OVERRIDE GroupType = 3 // generic overrides to existing checks/controls
GroupType_IGNORED GroupType = 4 // ignore scoring, snooze it
GroupType_DISABLE GroupType = 5 // disable execution, turn it off
GroupType_PROPERTIES GroupType = 6 // modify properties
GroupType_OUT_OF_SCOPE GroupType = 7 // out of scope, meaning it is not applicable
)
// Enum value maps for GroupType.
var (
GroupType_name = map[int32]string{
0: "UNCATEGORIZED",
1: "CHAPTER",
2: "IMPORT",
3: "OVERRIDE",
4: "IGNORED",
5: "DISABLE",
6: "PROPERTIES",
7: "OUT_OF_SCOPE",
}
GroupType_value = map[string]int32{
"UNCATEGORIZED": 0,
"CHAPTER": 1,
"IMPORT": 2,
"OVERRIDE": 3,
"IGNORED": 4,
"DISABLE": 5,
"PROPERTIES": 6,
"OUT_OF_SCOPE": 7,
}
)
func (x GroupType) Enum() *GroupType {
p := new(GroupType)
*p = x
return p
}
func (x GroupType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GroupType) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[0].Descriptor()
}
func (GroupType) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[0]
}
func (x GroupType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GroupType.Descriptor instead.
func (GroupType) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{0}
}
type QueryAction int32
const (
QueryAction_UNSPECIFIED QueryAction = 0
QueryAction_MODIFY QueryAction = 1
QueryAction_DEACTIVATE QueryAction = 2
QueryAction_ACTIVATE QueryAction = 3
)
// Enum value maps for QueryAction.
var (
QueryAction_name = map[int32]string{
0: "UNSPECIFIED",
1: "MODIFY",
2: "DEACTIVATE",
3: "ACTIVATE",
}
QueryAction_value = map[string]int32{
"UNSPECIFIED": 0,
"MODIFY": 1,
"DEACTIVATE": 2,
"ACTIVATE": 3,
}
)
func (x QueryAction) Enum() *QueryAction {
p := new(QueryAction)
*p = x
return p
}
func (x QueryAction) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (QueryAction) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[1].Descriptor()
}
func (QueryAction) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[1]
}
func (x QueryAction) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use QueryAction.Descriptor instead.
func (QueryAction) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{1}
}
type ScopeType int32
const (
// Scope type has not been set
ScopeType_UNSCOPED ScopeType = 0
// Scope applies to the entire asset and vulns and security
ScopeType_ASSET ScopeType = 1
// Scope applies to vulnerabilities on the entire asset
ScopeType_ASSET_VULNS ScopeType = 2
// Scope applies to certain resources on an asset, but not software
ScopeType_RESOURCE ScopeType = 4
// Scope applies to certain software (packages/libs), but not resources
ScopeType_SOFTWARE ScopeType = 5
// Scope applies to both software and resources on an asset
ScopeType_SOFTWARE_AND_RESOURCE ScopeType = 6
)
// Enum value maps for ScopeType.
var (
ScopeType_name = map[int32]string{
0: "UNSCOPED",
1: "ASSET",
2: "ASSET_VULNS",
4: "RESOURCE",
5: "SOFTWARE",
6: "SOFTWARE_AND_RESOURCE",
}
ScopeType_value = map[string]int32{
"UNSCOPED": 0,
"ASSET": 1,
"ASSET_VULNS": 2,
"RESOURCE": 4,
"SOFTWARE": 5,
"SOFTWARE_AND_RESOURCE": 6,
}
)
func (x ScopeType) Enum() *ScopeType {
p := new(ScopeType)
*p = x
return p
}
func (x ScopeType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ScopeType) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[2].Descriptor()
}
func (ScopeType) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[2]
}
func (x ScopeType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ScopeType.Descriptor instead.
func (ScopeType) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{2}
}
type ReviewStatus int32
const (
ReviewStatus_NOT_REVIEWED ReviewStatus = 0
ReviewStatus_APPROVED ReviewStatus = 1
ReviewStatus_REJECTED ReviewStatus = 2
)
// Enum value maps for ReviewStatus.
var (
ReviewStatus_name = map[int32]string{
0: "NOT_REVIEWED",
1: "APPROVED",
2: "REJECTED",
}
ReviewStatus_value = map[string]int32{
"NOT_REVIEWED": 0,
"APPROVED": 1,
"REJECTED": 2,
}
)
func (x ReviewStatus) Enum() *ReviewStatus {
p := new(ReviewStatus)
*p = x
return p
}
func (x ReviewStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReviewStatus) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[3].Descriptor()
}
func (ReviewStatus) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[3]
}
func (x ReviewStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ReviewStatus.Descriptor instead.
func (ReviewStatus) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{3}
}
type ScoreRating int32
const (
ScoreRating_unrated ScoreRating = 0
ScoreRating_aPlus ScoreRating = 1
ScoreRating_a ScoreRating = 2
ScoreRating_aMinus ScoreRating = 3
ScoreRating_bPlus ScoreRating = 4
ScoreRating_b ScoreRating = 5
ScoreRating_bMinus ScoreRating = 6
ScoreRating_cPlus ScoreRating = 7
ScoreRating_c ScoreRating = 8
ScoreRating_cMinus ScoreRating = 9
ScoreRating_dPlus ScoreRating = 10
ScoreRating_d ScoreRating = 11
ScoreRating_dMinus ScoreRating = 12
ScoreRating_failed ScoreRating = 13
ScoreRating_error ScoreRating = 14
ScoreRating_skip ScoreRating = 15
)
// Enum value maps for ScoreRating.
var (
ScoreRating_name = map[int32]string{
0: "unrated",
1: "aPlus",
2: "a",
3: "aMinus",
4: "bPlus",
5: "b",
6: "bMinus",
7: "cPlus",
8: "c",
9: "cMinus",
10: "dPlus",
11: "d",
12: "dMinus",
13: "failed",
14: "error",
15: "skip",
}
ScoreRating_value = map[string]int32{
"unrated": 0,
"aPlus": 1,
"a": 2,
"aMinus": 3,
"bPlus": 4,
"b": 5,
"bMinus": 6,
"cPlus": 7,
"c": 8,
"cMinus": 9,
"dPlus": 10,
"d": 11,
"dMinus": 12,
"failed": 13,
"error": 14,
"skip": 15,
}
)
func (x ScoreRating) Enum() *ScoreRating {
p := new(ScoreRating)
*p = x
return p
}
func (x ScoreRating) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ScoreRating) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[4].Descriptor()
}
func (ScoreRating) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[4]
}
func (x ScoreRating) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ScoreRating.Descriptor instead.
func (ScoreRating) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{4}
}
type Comparison int32
const (
Comparison_GREATER_THAN Comparison = 0
Comparison_LESS_THAN Comparison = 1
)
// Enum value maps for Comparison.
var (
Comparison_name = map[int32]string{
0: "GREATER_THAN",
1: "LESS_THAN",
}
Comparison_value = map[string]int32{
"GREATER_THAN": 0,
"LESS_THAN": 1,
}
)
func (x Comparison) Enum() *Comparison {
p := new(Comparison)
*p = x
return p
}
func (x Comparison) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Comparison) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[5].Descriptor()
}
func (Comparison) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[5]
}
func (x Comparison) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Comparison.Descriptor instead.
func (Comparison) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{5}
}
type DateFilterField int32
const (
DateFilterField_FILTER_LAST_UPDATED DateFilterField = 0
DateFilterField_FILTER_CREATED DateFilterField = 1
)
// Enum value maps for DateFilterField.
var (
DateFilterField_name = map[int32]string{
0: "FILTER_LAST_UPDATED",
1: "FILTER_CREATED",
}
DateFilterField_value = map[string]int32{
"FILTER_LAST_UPDATED": 0,
"FILTER_CREATED": 1,
}
)
func (x DateFilterField) Enum() *DateFilterField {
p := new(DateFilterField)
*p = x
return p
}
func (x DateFilterField) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DateFilterField) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[6].Descriptor()
}
func (DateFilterField) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[6]
}
func (x DateFilterField) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DateFilterField.Descriptor instead.
func (DateFilterField) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{6}
}
type Migration_Action int32
const (
Migration_UNSPECIFIED Migration_Action = 0
Migration_CREATE Migration_Action = 1
Migration_REMOVE Migration_Action = 2
Migration_MODIFY Migration_Action = 3
)
// Enum value maps for Migration_Action.
var (
Migration_Action_name = map[int32]string{
0: "UNSPECIFIED",
1: "CREATE",
2: "REMOVE",
3: "MODIFY",
}
Migration_Action_value = map[string]int32{
"UNSPECIFIED": 0,
"CREATE": 1,
"REMOVE": 2,
"MODIFY": 3,
}
)
func (x Migration_Action) Enum() *Migration_Action {
p := new(Migration_Action)
*p = x
return p
}
func (x Migration_Action) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Migration_Action) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[7].Descriptor()
}
func (Migration_Action) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[7]
}
func (x Migration_Action) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Migration_Action.Descriptor instead.
func (Migration_Action) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{7, 0}
}
type ReportingJob_Type int32
const (
ReportingJob_UNSPECIFIED ReportingJob_Type = 0
ReportingJob_CHECK ReportingJob_Type = 1
ReportingJob_DATA_QUERY ReportingJob_Type = 2
ReportingJob_CONTROL ReportingJob_Type = 3
ReportingJob_POLICY ReportingJob_Type = 4
ReportingJob_FRAMEWORK ReportingJob_Type = 5
ReportingJob_RISK_FACTOR ReportingJob_Type = 6
ReportingJob_CHECK_AND_DATA_QUERY ReportingJob_Type = 7
ReportingJob_EXECUTION_QUERY ReportingJob_Type = 8
)
// Enum value maps for ReportingJob_Type.
var (
ReportingJob_Type_name = map[int32]string{
0: "UNSPECIFIED",
1: "CHECK",
2: "DATA_QUERY",
3: "CONTROL",
4: "POLICY",
5: "FRAMEWORK",
6: "RISK_FACTOR",
7: "CHECK_AND_DATA_QUERY",
8: "EXECUTION_QUERY",
}
ReportingJob_Type_value = map[string]int32{
"UNSPECIFIED": 0,
"CHECK": 1,
"DATA_QUERY": 2,
"CONTROL": 3,
"POLICY": 4,
"FRAMEWORK": 5,
"RISK_FACTOR": 6,
"CHECK_AND_DATA_QUERY": 7,
"EXECUTION_QUERY": 8,
}
)
func (x ReportingJob_Type) Enum() *ReportingJob_Type {
p := new(ReportingJob_Type)
*p = x
return p
}
func (x ReportingJob_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReportingJob_Type) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[8].Descriptor()
}
func (ReportingJob_Type) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[8]
}
func (x ReportingJob_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ReportingJob_Type.Descriptor instead.
func (ReportingJob_Type) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{34, 0}
}
type PolicyDelta_PolicyAssignmentActionType int32
const (
PolicyDelta_ADD PolicyDelta_PolicyAssignmentActionType = 0
PolicyDelta_DELETE PolicyDelta_PolicyAssignmentActionType = 1
)
// Enum value maps for PolicyDelta_PolicyAssignmentActionType.
var (
PolicyDelta_PolicyAssignmentActionType_name = map[int32]string{
0: "ADD",
1: "DELETE",
}
PolicyDelta_PolicyAssignmentActionType_value = map[string]int32{
"ADD": 0,
"DELETE": 1,
}
)
func (x PolicyDelta_PolicyAssignmentActionType) Enum() *PolicyDelta_PolicyAssignmentActionType {
p := new(PolicyDelta_PolicyAssignmentActionType)
*p = x
return p
}
func (x PolicyDelta_PolicyAssignmentActionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PolicyDelta_PolicyAssignmentActionType) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[9].Descriptor()
}
func (PolicyDelta_PolicyAssignmentActionType) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[9]
}
func (x PolicyDelta_PolicyAssignmentActionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PolicyDelta_PolicyAssignmentActionType.Descriptor instead.
func (PolicyDelta_PolicyAssignmentActionType) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{60, 0}
}
type Source_Vendor int32
const (
Source_UNSPECIFIED Source_Vendor = 0
Source_MONDOO Source_Vendor = 1
Source_MICROSOFT Source_Vendor = 2
Source_CROWDSTRIKE Source_Vendor = 3
Source_SENTINEL_ONE Source_Vendor = 4
)
// Enum value maps for Source_Vendor.
var (
Source_Vendor_name = map[int32]string{
0: "UNSPECIFIED",
1: "MONDOO",
2: "MICROSOFT",
3: "CROWDSTRIKE",
4: "SENTINEL_ONE",
}
Source_Vendor_value = map[string]int32{
"UNSPECIFIED": 0,
"MONDOO": 1,
"MICROSOFT": 2,
"CROWDSTRIKE": 3,
"SENTINEL_ONE": 4,
}
)
func (x Source_Vendor) Enum() *Source_Vendor {
p := new(Source_Vendor)
*p = x
return p
}
func (x Source_Vendor) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Source_Vendor) Descriptor() protoreflect.EnumDescriptor {
return file_cnspec_policy_proto_enumTypes[10].Descriptor()
}
func (Source_Vendor) Type() protoreflect.EnumType {
return &file_cnspec_policy_proto_enumTypes[10]
}
func (x Source_Vendor) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Source_Vendor.Descriptor instead.
func (Source_Vendor) EnumDescriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{72, 0}
}
// PolicyGroup specifies and overrides a policy and all its queries and referenced policies.
// - Queries have UUIDs across all policies, so these overrides reach across policies.
// - Policies are targeted via UUID as well and may override their scoring behavior.
// - PolicyGroups can be time-limited
// - PolicyGroups can be limited to a subset of assets
type PolicyGroup struct {
state protoimpl.MessageState `protogen:"open.v1"`
Policies []*PolicyRef `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"`
Checks []*explorer.Mquery `protobuf:"bytes,2,rep,name=checks,proto3" json:"checks,omitempty"`
Queries []*explorer.Mquery `protobuf:"bytes,3,rep,name=queries,proto3" json:"queries,omitempty"`
Type GroupType `protobuf:"varint,4,opt,name=type,proto3,enum=cnspec.policy.v1.GroupType" json:"type,omitempty"`
Uid string `protobuf:"bytes,5,opt,name=uid,proto3" json:"uid,omitempty"`
// filter for the assets this applies to
Filters *explorer.Filters `protobuf:"bytes,20,opt,name=filters,proto3" json:"filters,omitempty"`
// the timeline during which overrides are active and reminders will be sent
StartDate int64 `protobuf:"varint,21,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
EndDate int64 `protobuf:"varint,22,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
ReminderDate int64 `protobuf:"varint,23,opt,name=reminder_date,json=reminderDate,proto3" json:"reminder_date,omitempty"`
// metadata
Title string `protobuf:"bytes,24,opt,name=title,proto3" json:"title,omitempty"`
Docs *PolicyGroupDocs `protobuf:"bytes,25,opt,name=docs,proto3" json:"docs,omitempty"`
Authors []*explorer.Author `protobuf:"bytes,26,rep,name=authors,proto3" json:"authors,omitempty"`
Reviewers []*explorer.Author `protobuf:"bytes,27,rep,name=reviewers,proto3" json:"reviewers,omitempty"`
// only applies to GroupType IGNORED/DISABLED
// Only if status is REJECTED, we ignore the group
// Which means that unapproved groups get handled as if they were approved
ReviewStatus ReviewStatus `protobuf:"varint,28,opt,name=review_status,json=reviewStatus,proto3,enum=cnspec.policy.v1.ReviewStatus" json:"review_status,omitempty"`
Created int64 `protobuf:"varint,32,opt,name=created,proto3" json:"created,omitempty"`
Modified int64 `protobuf:"varint,33,opt,name=modified,proto3" json:"modified,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PolicyGroup) Reset() {
*x = PolicyGroup{}
mi := &file_cnspec_policy_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PolicyGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PolicyGroup) ProtoMessage() {}
func (x *PolicyGroup) ProtoReflect() protoreflect.Message {
mi := &file_cnspec_policy_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PolicyGroup.ProtoReflect.Descriptor instead.
func (*PolicyGroup) Descriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{0}
}
func (x *PolicyGroup) GetPolicies() []*PolicyRef {
if x != nil {
return x.Policies
}
return nil
}
func (x *PolicyGroup) GetChecks() []*explorer.Mquery {
if x != nil {
return x.Checks
}
return nil
}
func (x *PolicyGroup) GetQueries() []*explorer.Mquery {
if x != nil {
return x.Queries
}
return nil
}
func (x *PolicyGroup) GetType() GroupType {
if x != nil {
return x.Type
}
return GroupType_UNCATEGORIZED
}
func (x *PolicyGroup) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *PolicyGroup) GetFilters() *explorer.Filters {
if x != nil {
return x.Filters
}
return nil
}
func (x *PolicyGroup) GetStartDate() int64 {
if x != nil {
return x.StartDate
}
return 0
}
func (x *PolicyGroup) GetEndDate() int64 {
if x != nil {
return x.EndDate
}
return 0
}
func (x *PolicyGroup) GetReminderDate() int64 {
if x != nil {
return x.ReminderDate
}
return 0
}
func (x *PolicyGroup) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *PolicyGroup) GetDocs() *PolicyGroupDocs {
if x != nil {
return x.Docs
}
return nil
}
func (x *PolicyGroup) GetAuthors() []*explorer.Author {
if x != nil {
return x.Authors
}
return nil
}
func (x *PolicyGroup) GetReviewers() []*explorer.Author {
if x != nil {
return x.Reviewers
}
return nil
}
func (x *PolicyGroup) GetReviewStatus() ReviewStatus {
if x != nil {
return x.ReviewStatus
}
return ReviewStatus_NOT_REVIEWED
}
func (x *PolicyGroup) GetCreated() int64 {
if x != nil {
return x.Created
}
return 0
}
func (x *PolicyGroup) GetModified() int64 {
if x != nil {
return x.Modified
}
return 0
}
type PolicyRef struct {
state protoimpl.MessageState `protogen:"open.v1"`
Mrn string `protobuf:"bytes,1,opt,name=mrn,proto3" json:"mrn,omitempty"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// Action is used for all policy overrides
Action explorer.Action `protobuf:"varint,41,opt,name=action,proto3,enum=cnquery.explorer.Action" json:"action,omitempty"`
// Impact allows to override the way the score of the policy is aggregated
Impact *explorer.Impact `protobuf:"bytes,23,opt,name=impact,proto3" json:"impact,omitempty"`
// ScoringSystem allows overriding the scoring system of the policy
ScoringSystem explorer.ScoringSystem `protobuf:"varint,42,opt,name=scoring_system,json=scoringSystem,proto3,enum=cnquery.explorer.ScoringSystem" json:"scoring_system,omitempty"`
// timestamp when the policy was last applied
LastApplied int64 `protobuf:"varint,43,opt,name=last_applied,json=lastApplied,proto3" json:"last_applied,omitempty"`
// local checksum for the contents of this policy reference
Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PolicyRef) Reset() {
*x = PolicyRef{}
mi := &file_cnspec_policy_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PolicyRef) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PolicyRef) ProtoMessage() {}
func (x *PolicyRef) ProtoReflect() protoreflect.Message {
mi := &file_cnspec_policy_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PolicyRef.ProtoReflect.Descriptor instead.
func (*PolicyRef) Descriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{1}
}
func (x *PolicyRef) GetMrn() string {
if x != nil {
return x.Mrn
}
return ""
}
func (x *PolicyRef) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *PolicyRef) GetAction() explorer.Action {
if x != nil {
return x.Action
}
return explorer.Action(0)
}
func (x *PolicyRef) GetImpact() *explorer.Impact {
if x != nil {
return x.Impact
}
return nil
}
func (x *PolicyRef) GetScoringSystem() explorer.ScoringSystem {
if x != nil {
return x.ScoringSystem
}
return explorer.ScoringSystem(0)
}
func (x *PolicyRef) GetLastApplied() int64 {
if x != nil {
return x.LastApplied
}
return 0
}
func (x *PolicyRef) GetChecksum() string {
if x != nil {
return x.Checksum
}
return ""
}
// Policy definition, re-usable or assigned to the user's environment
// - Contains all policies and overrides
// - Can limit to what it supports
type Policy struct {
state protoimpl.MessageState `protogen:"open.v1"`
Mrn string `protobuf:"bytes,1,opt,name=mrn,proto3" json:"mrn,omitempty"` // will be filled from UID on upload
Uid string `protobuf:"bytes,36,opt,name=uid,proto3" json:"uid,omitempty"` // uid is only used initially, to generate the MRN
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
OwnerMrn string `protobuf:"bytes,8,opt,name=owner_mrn,json=ownerMrn,proto3" json:"owner_mrn,omitempty"`
Groups []*PolicyGroup `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,omitempty"`
License string `protobuf:"bytes,21,opt,name=license,proto3" json:"license,omitempty"`
Docs *PolicyDocs `protobuf:"bytes,41,opt,name=docs,proto3" json:"docs,omitempty"`
Summary string `protobuf:"bytes,46,opt,name=summary,proto3" json:"summary,omitempty"`
ScoringSystem explorer.ScoringSystem `protobuf:"varint,10,opt,name=scoring_system,json=scoringSystem,proto3,enum=cnquery.explorer.ScoringSystem" json:"scoring_system,omitempty"`
Authors []*explorer.Author `protobuf:"bytes,30,rep,name=authors,proto3" json:"authors,omitempty"`
Created int64 `protobuf:"varint,32,opt,name=created,proto3" json:"created,omitempty"`
Modified int64 `protobuf:"varint,33,opt,name=modified,proto3" json:"modified,omitempty"`
Tags map[string]string `protobuf:"bytes,34,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Props []*explorer.Property `protobuf:"bytes,45,rep,name=props,proto3" json:"props,omitempty"`
RiskFactors []*RiskFactor `protobuf:"bytes,47,rep,name=risk_factors,json=riskFactors,proto3" json:"risk_factors,omitempty"`
// checksums are grouped into:
// local... meaning this policy, not policy dependencies
// graph... meaning this and all dependent policies
// content... meaning all the content in the policy, everything there is
// execution... meaning everything that changes the resolved policy
LocalContentChecksum string `protobuf:"bytes,37,opt,name=local_content_checksum,json=localContentChecksum,proto3" json:"local_content_checksum,omitempty"`
GraphContentChecksum string `protobuf:"bytes,38,opt,name=graph_content_checksum,json=graphContentChecksum,proto3" json:"graph_content_checksum,omitempty"`
LocalExecutionChecksum string `protobuf:"bytes,39,opt,name=local_execution_checksum,json=localExecutionChecksum,proto3" json:"local_execution_checksum,omitempty"`
GraphExecutionChecksum string `protobuf:"bytes,40,opt,name=graph_execution_checksum,json=graphExecutionChecksum,proto3" json:"graph_execution_checksum,omitempty"`
// aggregation of all filters applicable to this policy. auto-generated
ComputedFilters *explorer.Filters `protobuf:"bytes,43,opt,name=computed_filters,json=computedFilters,proto3" json:"computed_filters,omitempty"`
QueryCounts *QueryCounts `protobuf:"bytes,42,opt,name=query_counts,json=queryCounts,proto3" json:"query_counts,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Policy) Reset() {
*x = Policy{}
mi := &file_cnspec_policy_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Policy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Policy) ProtoMessage() {}
func (x *Policy) ProtoReflect() protoreflect.Message {
mi := &file_cnspec_policy_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Policy.ProtoReflect.Descriptor instead.
func (*Policy) Descriptor() ([]byte, []int) {
return file_cnspec_policy_proto_rawDescGZIP(), []int{2}
}
func (x *Policy) GetMrn() string {