-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkube-bench-output.json
2403 lines (2403 loc) · 266 KB
/
kube-bench-output.json
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
{
"Controls": [
{
"id": "1",
"version": "cis-1.23",
"detected_version": "1.25",
"text": "Control Plane Security Configuration",
"node_type": "master",
"tests": [
{
"section": "1.1",
"type": "",
"pass": 14,
"fail": 3,
"warn": 4,
"info": 0,
"desc": "Control Plane Node Configuration Files",
"results": [
{
"test_number": "1.1.1",
"test_desc": "Ensure that the API server pod specification file permissions are set to 644 or more restrictive (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/kube-apiserver.yaml; then stat -c permissions=%a /etc/kubernetes/manifests/kube-apiserver.yaml; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the\ncontrol plane node.\nFor example, chmod 644 /etc/kubernetes/manifests/kube-apiserver.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the\ncontrol plane node.\nFor example, chmod 644 /etc/kubernetes/manifests/kube-apiserver.yaml\n"
],
"status": "PASS",
"actual_value": "permissions=600",
"scored": true,
"IsMultiple": false,
"expected_result": "permissions has permissions 600, expected 644 or more restrictive"
},
{
"test_number": "1.1.2",
"test_desc": "Ensure that the API server pod specification file ownership is set to root:root (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/kube-apiserver.yaml; then stat -c %U:%G /etc/kubernetes/manifests/kube-apiserver.yaml; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/manifests/kube-apiserver.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/manifests/kube-apiserver.yaml\n"
],
"status": "PASS",
"actual_value": "root:root",
"scored": true,
"IsMultiple": false,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.3",
"test_desc": "Ensure that the controller manager pod specification file permissions are set to 644 or more restrictive (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/kube-controller-manager.yaml; then stat -c permissions=%a /etc/kubernetes/manifests/kube-controller-manager.yaml; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 644 /etc/kubernetes/manifests/kube-controller-manager.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 644 /etc/kubernetes/manifests/kube-controller-manager.yaml\n"
],
"status": "PASS",
"actual_value": "permissions=600",
"scored": true,
"IsMultiple": false,
"expected_result": "permissions has permissions 600, expected 644 or more restrictive"
},
{
"test_number": "1.1.4",
"test_desc": "Ensure that the controller manager pod specification file ownership is set to root:root (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/kube-controller-manager.yaml; then stat -c %U:%G /etc/kubernetes/manifests/kube-controller-manager.yaml; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/manifests/kube-controller-manager.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/manifests/kube-controller-manager.yaml\n"
],
"status": "PASS",
"actual_value": "root:root",
"scored": true,
"IsMultiple": false,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.5",
"test_desc": "Ensure that the scheduler pod specification file permissions are set to 644 or more restrictive (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/kube-scheduler.yaml; then stat -c permissions=%a /etc/kubernetes/manifests/kube-scheduler.yaml; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 644 /etc/kubernetes/manifests/kube-scheduler.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 644 /etc/kubernetes/manifests/kube-scheduler.yaml\n"
],
"status": "PASS",
"actual_value": "permissions=600",
"scored": true,
"IsMultiple": false,
"expected_result": "permissions has permissions 600, expected 644 or more restrictive"
},
{
"test_number": "1.1.6",
"test_desc": "Ensure that the scheduler pod specification file ownership is set to root:root (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/kube-scheduler.yaml; then stat -c %U:%G /etc/kubernetes/manifests/kube-scheduler.yaml; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/manifests/kube-scheduler.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/manifests/kube-scheduler.yaml\n"
],
"status": "PASS",
"actual_value": "root:root",
"scored": true,
"IsMultiple": false,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.7",
"test_desc": "Ensure that the etcd pod specification file permissions are set to 644 or more restrictive (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/etcd.yaml; then find /etc/kubernetes/manifests/etcd.yaml -name '*etcd*' | xargs stat -c permissions=%a; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod 644 /etc/kubernetes/manifests/etcd.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod 644 /etc/kubernetes/manifests/etcd.yaml\n"
],
"status": "PASS",
"actual_value": "permissions=600",
"scored": true,
"IsMultiple": true,
"expected_result": "permissions has permissions 600, expected 644 or more restrictive"
},
{
"test_number": "1.1.8",
"test_desc": "Ensure that the etcd pod specification file ownership is set to root:root (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/manifests/etcd.yaml; then find /etc/kubernetes/manifests/etcd.yaml -name '*etcd*' | xargs stat -c %U:%G; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root /etc/kubernetes/manifests/etcd.yaml\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root /etc/kubernetes/manifests/etcd.yaml\n"
],
"status": "PASS",
"actual_value": "root:root",
"scored": true,
"IsMultiple": true,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.9",
"test_desc": "Ensure that the Container Network Interface file permissions are set to 644 or more restrictive (Manual)",
"audit": "ps -ef | grep kubelet | grep -- --cni-conf-dir | sed 's%.*cni-conf-dir[= ]\\([^ ]*\\).*%\\1%' | xargs -I{} find {} -mindepth 1 | xargs --no-run-if-empty stat -c permissions=%a\nfind /var/lib/cni/networks -type f 2\u003e /dev/null | xargs --no-run-if-empty stat -c permissions=%a\n",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 644 \u003cpath/to/cni/files\u003e\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 644 \u003cpath/to/cni/files\u003e\n"
],
"status": "WARN",
"actual_value": "",
"scored": false,
"IsMultiple": true,
"expected_result": "'permissions' is present"
},
{
"test_number": "1.1.10",
"test_desc": "Ensure that the Container Network Interface file ownership is set to root:root (Manual)",
"audit": "ps -ef | grep kubelet | grep -- --cni-conf-dir | sed 's%.*cni-conf-dir[= ]\\([^ ]*\\).*%\\1%' | xargs -I{} find {} -mindepth 1 | xargs --no-run-if-empty stat -c %U:%G\nfind /var/lib/cni/networks -type f 2\u003e /dev/null | xargs --no-run-if-empty stat -c %U:%G\n",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root \u003cpath/to/cni/files\u003e\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root \u003cpath/to/cni/files\u003e\n"
],
"status": "WARN",
"actual_value": "",
"scored": false,
"IsMultiple": true,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.11",
"test_desc": "Ensure that the etcd data directory permissions are set to 700 or more restrictive (Automated)",
"audit": "ps -ef | grep etcd | grep -- --data-dir | sed 's%.*data-dir[= ]\\([^ ]*\\).*%\\1%' | xargs stat -c permissions=%a",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "On the etcd server node, get the etcd data directory, passed as an argument --data-dir,\nfrom the command 'ps -ef | grep etcd'.\nRun the below command (based on the etcd data directory found above). For example,\nchmod 700 /var/lib/etcd\n",
"test_info": [
"On the etcd server node, get the etcd data directory, passed as an argument --data-dir,\nfrom the command 'ps -ef | grep etcd'.\nRun the below command (based on the etcd data directory found above). For example,\nchmod 700 /var/lib/etcd\n"
],
"status": "FAIL",
"actual_value": "",
"scored": true,
"IsMultiple": false,
"expected_result": "",
"reason": "failed to run: \"ps -ef | grep etcd | grep -- --data-dir | sed 's%.*data-dir[= ]\\\\([^ ]*\\\\).*%\\\\1%' | xargs stat -c permissions=%a\", output: \"stat: can't stat '/var/lib/minikube/etcd': No such file or directory\\n\", error: exit status 123"
},
{
"test_number": "1.1.12",
"test_desc": "Ensure that the etcd data directory ownership is set to etcd:etcd (Automated)",
"audit": "ps -ef | grep etcd | grep -- --data-dir | sed 's%.*data-dir[= ]\\([^ ]*\\).*%\\1%' | xargs stat -c %U:%G",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "On the etcd server node, get the etcd data directory, passed as an argument --data-dir,\nfrom the command 'ps -ef | grep etcd'.\nRun the below command (based on the etcd data directory found above).\nFor example, chown etcd:etcd /var/lib/etcd\n",
"test_info": [
"On the etcd server node, get the etcd data directory, passed as an argument --data-dir,\nfrom the command 'ps -ef | grep etcd'.\nRun the below command (based on the etcd data directory found above).\nFor example, chown etcd:etcd /var/lib/etcd\n"
],
"status": "FAIL",
"actual_value": "",
"scored": true,
"IsMultiple": false,
"expected_result": "",
"reason": "failed to run: \"ps -ef | grep etcd | grep -- --data-dir | sed 's%.*data-dir[= ]\\\\([^ ]*\\\\).*%\\\\1%' | xargs stat -c %U:%G\", output: \"stat: can't stat '/var/lib/minikube/etcd': No such file or directory\\n\", error: exit status 123"
},
{
"test_number": "1.1.13",
"test_desc": "Ensure that the admin.conf file permissions are set to 600 or more restrictive (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/admin.conf; then stat -c permissions=%a /etc/kubernetes/admin.conf; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 600 /etc/kubernetes/admin.conf\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chmod 600 /etc/kubernetes/admin.conf\n"
],
"status": "PASS",
"actual_value": "permissions=600",
"scored": true,
"IsMultiple": false,
"expected_result": "permissions has permissions 600, expected 600 or more restrictive"
},
{
"test_number": "1.1.14",
"test_desc": "Ensure that the admin.conf file ownership is set to root:root (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/admin.conf; then stat -c %U:%G /etc/kubernetes/admin.conf; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/admin.conf\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example, chown root:root /etc/kubernetes/admin.conf\n"
],
"status": "PASS",
"actual_value": "root:root",
"scored": true,
"IsMultiple": false,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.15",
"test_desc": "Ensure that the scheduler.conf file permissions are set to 644 or more restrictive (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/scheduler.conf; then stat -c permissions=%a /etc/kubernetes/scheduler.conf; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod 644 /etc/kubernetes/scheduler.conf\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod 644 /etc/kubernetes/scheduler.conf\n"
],
"status": "PASS",
"actual_value": "permissions=600",
"scored": true,
"IsMultiple": false,
"expected_result": "permissions has permissions 600, expected 644 or more restrictive"
},
{
"test_number": "1.1.16",
"test_desc": "Ensure that the scheduler.conf file ownership is set to root:root (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/scheduler.conf; then stat -c %U:%G /etc/kubernetes/scheduler.conf; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root /etc/kubernetes/scheduler.conf\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root /etc/kubernetes/scheduler.conf\n"
],
"status": "PASS",
"actual_value": "root:root",
"scored": true,
"IsMultiple": false,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.17",
"test_desc": "Ensure that the controller-manager.conf file permissions are set to 644 or more restrictive (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/controller-manager.conf; then stat -c permissions=%a /etc/kubernetes/controller-manager.conf; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod 644 /etc/kubernetes/controller-manager.conf\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod 644 /etc/kubernetes/controller-manager.conf\n"
],
"status": "PASS",
"actual_value": "permissions=600",
"scored": true,
"IsMultiple": false,
"expected_result": "permissions has permissions 600, expected 644 or more restrictive"
},
{
"test_number": "1.1.18",
"test_desc": "Ensure that the controller-manager.conf file ownership is set to root:root (Automated)",
"audit": "/bin/sh -c 'if test -e /etc/kubernetes/controller-manager.conf; then stat -c %U:%G /etc/kubernetes/controller-manager.conf; fi'",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root /etc/kubernetes/controller-manager.conf\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown root:root /etc/kubernetes/controller-manager.conf\n"
],
"status": "PASS",
"actual_value": "root:root",
"scored": true,
"IsMultiple": false,
"expected_result": "'root:root' is present"
},
{
"test_number": "1.1.19",
"test_desc": "Ensure that the Kubernetes PKI directory and file ownership is set to root:root (Automated)",
"audit": "find /etc/kubernetes/pki/ | xargs stat -c %U:%G",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown -R root:root /etc/kubernetes/pki/\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchown -R root:root /etc/kubernetes/pki/\n"
],
"status": "FAIL",
"actual_value": "",
"scored": true,
"IsMultiple": true,
"expected_result": "",
"reason": "failed to run: \"find /etc/kubernetes/pki/ | xargs stat -c %U:%G\", output: \"find: /etc/kubernetes/pki/: No such file or directory\\nBusyBox v1.35.0 (2022-08-01 15:14:44 UTC) multi-call binary.\\n\\nUsage: stat [-ltf] [-c FMT] FILE...\\n\\nDisplay file (default) or filesystem status\\n\\n\\t-c FMT\\tUse the specified format\\n\\t-f\\tDisplay filesystem status\\n\\t-L\\tFollow links\\n\\t-t\\tTerse display\\n\\nFMT sequences for files:\\n %a\\tAccess rights in octal\\n %A\\tAccess rights in human readable form\\n %b\\tNumber of blocks allocated (see %B)\\n %B\\tSize in bytes of each block reported by %b\\n %d\\tDevice number in decimal\\n %D\\tDevice number in hex\\n %f\\tRaw mode in hex\\n %F\\tFile type\\n %g\\tGroup ID\\n %G\\tGroup name\\n %h\\tNumber of hard links\\n %i\\tInode number\\n %n\\tFile name\\n %N\\tFile name, with -\u003e TARGET if symlink\\n %o\\tI/O block size\\n %s\\tTotal size in bytes\\n %t\\tMajor device type in hex\\n %T\\tMinor device type in hex\\n %u\\tUser ID\\n %U\\tUser name\\n %x\\tTime of last access\\n %X\\tTime of last access as seconds since Epoch\\n %y\\tTime of last modification\\n %Y\\tTime of last modification as seconds since Epoch\\n %z\\tTime of last change\\n %Z\\tTime of last change as seconds since Epoch\\n\\nFMT sequences for file systems:\\n %a\\tFree blocks available to non-superuser\\n %b\\tTotal data blocks\\n %c\\tTotal file nodes\\n %d\\tFree file nodes\\n %f\\tFree blocks\\n %i\\tFile System ID in hex\\n %l\\tMaximum length of filenames\\n %n\\tFile name\\n %s\\tBlock size (for faster transfer)\\n %S\\tFundamental block size (for block counts)\\n %t\\tType in hex\\n %T\\tType in human readable form\\n\", error: exit status 123"
},
{
"test_number": "1.1.20",
"test_desc": "Ensure that the Kubernetes PKI certificate file permissions are set to 644 or more restrictive (Manual)",
"audit": "find /etc/kubernetes/pki/ -name '*.crt' | xargs stat -c permissions=%a",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod -R 644 /etc/kubernetes/pki/*.crt\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod -R 644 /etc/kubernetes/pki/*.crt\n"
],
"status": "WARN",
"actual_value": "",
"scored": false,
"IsMultiple": true,
"expected_result": "",
"reason": "failed to run: \"find /etc/kubernetes/pki/ -name '*.crt' | xargs stat -c permissions=%a\", output: \"find: /etc/kubernetes/pki/: No such file or directory\\nBusyBox v1.35.0 (2022-08-01 15:14:44 UTC) multi-call binary.\\n\\nUsage: stat [-ltf] [-c FMT] FILE...\\n\\nDisplay file (default) or filesystem status\\n\\n\\t-c FMT\\tUse the specified format\\n\\t-f\\tDisplay filesystem status\\n\\t-L\\tFollow links\\n\\t-t\\tTerse display\\n\\nFMT sequences for files:\\n %a\\tAccess rights in octal\\n %A\\tAccess rights in human readable form\\n %b\\tNumber of blocks allocated (see %B)\\n %B\\tSize in bytes of each block reported by %b\\n %d\\tDevice number in decimal\\n %D\\tDevice number in hex\\n %f\\tRaw mode in hex\\n %F\\tFile type\\n %g\\tGroup ID\\n %G\\tGroup name\\n %h\\tNumber of hard links\\n %i\\tInode number\\n %n\\tFile name\\n %N\\tFile name, with -\u003e TARGET if symlink\\n %o\\tI/O block size\\n %s\\tTotal size in bytes\\n %t\\tMajor device type in hex\\n %T\\tMinor device type in hex\\n %u\\tUser ID\\n %U\\tUser name\\n %x\\tTime of last access\\n %X\\tTime of last access as seconds since Epoch\\n %y\\tTime of last modification\\n %Y\\tTime of last modification as seconds since Epoch\\n %z\\tTime of last change\\n %Z\\tTime of last change as seconds since Epoch\\n\\nFMT sequences for file systems:\\n %a\\tFree blocks available to non-superuser\\n %b\\tTotal data blocks\\n %c\\tTotal file nodes\\n %d\\tFree file nodes\\n %f\\tFree blocks\\n %i\\tFile System ID in hex\\n %l\\tMaximum length of filenames\\n %n\\tFile name\\n %s\\tBlock size (for faster transfer)\\n %S\\tFundamental block size (for block counts)\\n %t\\tType in hex\\n %T\\tType in human readable form\\n\", error: exit status 123"
},
{
"test_number": "1.1.21",
"test_desc": "Ensure that the Kubernetes PKI key file permissions are set to 600 (Manual)",
"audit": "find /etc/kubernetes/pki/ -name '*.key' | xargs stat -c permissions=%a",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod -R 600 /etc/kubernetes/pki/*.key\n",
"test_info": [
"Run the below command (based on the file location on your system) on the control plane node.\nFor example,\nchmod -R 600 /etc/kubernetes/pki/*.key\n"
],
"status": "WARN",
"actual_value": "",
"scored": false,
"IsMultiple": true,
"expected_result": "",
"reason": "failed to run: \"find /etc/kubernetes/pki/ -name '*.key' | xargs stat -c permissions=%a\", output: \"find: /etc/kubernetes/pki/: No such file or directory\\nBusyBox v1.35.0 (2022-08-01 15:14:44 UTC) multi-call binary.\\n\\nUsage: stat [-ltf] [-c FMT] FILE...\\n\\nDisplay file (default) or filesystem status\\n\\n\\t-c FMT\\tUse the specified format\\n\\t-f\\tDisplay filesystem status\\n\\t-L\\tFollow links\\n\\t-t\\tTerse display\\n\\nFMT sequences for files:\\n %a\\tAccess rights in octal\\n %A\\tAccess rights in human readable form\\n %b\\tNumber of blocks allocated (see %B)\\n %B\\tSize in bytes of each block reported by %b\\n %d\\tDevice number in decimal\\n %D\\tDevice number in hex\\n %f\\tRaw mode in hex\\n %F\\tFile type\\n %g\\tGroup ID\\n %G\\tGroup name\\n %h\\tNumber of hard links\\n %i\\tInode number\\n %n\\tFile name\\n %N\\tFile name, with -\u003e TARGET if symlink\\n %o\\tI/O block size\\n %s\\tTotal size in bytes\\n %t\\tMajor device type in hex\\n %T\\tMinor device type in hex\\n %u\\tUser ID\\n %U\\tUser name\\n %x\\tTime of last access\\n %X\\tTime of last access as seconds since Epoch\\n %y\\tTime of last modification\\n %Y\\tTime of last modification as seconds since Epoch\\n %z\\tTime of last change\\n %Z\\tTime of last change as seconds since Epoch\\n\\nFMT sequences for file systems:\\n %a\\tFree blocks available to non-superuser\\n %b\\tTotal data blocks\\n %c\\tTotal file nodes\\n %d\\tFree file nodes\\n %f\\tFree blocks\\n %i\\tFile System ID in hex\\n %l\\tMaximum length of filenames\\n %n\\tFile name\\n %s\\tBlock size (for faster transfer)\\n %S\\tFundamental block size (for block counts)\\n %t\\tType in hex\\n %T\\tType in human readable form\\n\", error: exit status 123"
}
]
},
{
"section": "1.2",
"type": "",
"pass": 18,
"fail": 6,
"warn": 8,
"info": 0,
"desc": "API Server",
"results": [
{
"test_number": "1.2.1",
"test_desc": "Ensure that the --anonymous-auth argument is set to false (Manual)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--anonymous-auth=false\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--anonymous-auth=false\n"
],
"status": "WARN",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": false,
"IsMultiple": false,
"expected_result": "'--anonymous-auth' is present"
},
{
"test_number": "1.2.2",
"test_desc": "Ensure that the --token-auth-file parameter is not set (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the documentation and configure alternate mechanisms for authentication. Then,\nedit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the --token-auth-file=\u003cfilename\u003e parameter.\n",
"test_info": [
"Follow the documentation and configure alternate mechanisms for authentication. Then,\nedit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the --token-auth-file=\u003cfilename\u003e parameter.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--token-auth-file' is not present"
},
{
"test_number": "1.2.3",
"test_desc": "Ensure that the --DenyServiceExternalIPs is not set (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the `DenyServiceExternalIPs`\nfrom enabled admission plugins.\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the `DenyServiceExternalIPs`\nfrom enabled admission plugins.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--enable-admission-plugins' does not have 'DenyServiceExternalIPs' OR '--enable-admission-plugins' is not present"
},
{
"test_number": "1.2.4",
"test_desc": "Ensure that the --kubelet-https argument is set to true (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the --kubelet-https parameter.\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and remove the --kubelet-https parameter.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--kubelet-https' is present OR '--kubelet-https' is not present"
},
{
"test_number": "1.2.5",
"test_desc": "Ensure that the --kubelet-client-certificate and --kubelet-client-key arguments are set as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and set up the TLS connection between the\napiserver and kubelets. Then, edit API server pod specification file\n/etc/kubernetes/manifests/kube-apiserver.yaml on the control plane node and set the\nkubelet client certificate and key parameters as below.\n--kubelet-client-certificate=\u003cpath/to/client-certificate-file\u003e\n--kubelet-client-key=\u003cpath/to/client-key-file\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and set up the TLS connection between the\napiserver and kubelets. Then, edit API server pod specification file\n/etc/kubernetes/manifests/kube-apiserver.yaml on the control plane node and set the\nkubelet client certificate and key parameters as below.\n--kubelet-client-certificate=\u003cpath/to/client-certificate-file\u003e\n--kubelet-client-key=\u003cpath/to/client-key-file\u003e\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--kubelet-client-certificate' is present AND '--kubelet-client-key' is present"
},
{
"test_number": "1.2.6",
"test_desc": "Ensure that the --kubelet-certificate-authority argument is set as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and setup the TLS connection between\nthe apiserver and kubelets. Then, edit the API server pod specification file\n/etc/kubernetes/manifests/kube-apiserver.yaml on the control plane node and set the\n--kubelet-certificate-authority parameter to the path to the cert file for the certificate authority.\n--kubelet-certificate-authority=\u003cca-string\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and setup the TLS connection between\nthe apiserver and kubelets. Then, edit the API server pod specification file\n/etc/kubernetes/manifests/kube-apiserver.yaml on the control plane node and set the\n--kubelet-certificate-authority parameter to the path to the cert file for the certificate authority.\n--kubelet-certificate-authority=\u003cca-string\u003e\n"
],
"status": "FAIL",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--kubelet-certificate-authority' is present"
},
{
"test_number": "1.2.7",
"test_desc": "Ensure that the --authorization-mode argument is not set to AlwaysAllow (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to values other than AlwaysAllow.\nOne such example could be as below.\n--authorization-mode=RBAC\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to values other than AlwaysAllow.\nOne such example could be as below.\n--authorization-mode=RBAC\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--authorization-mode' does not have 'AlwaysAllow'"
},
{
"test_number": "1.2.8",
"test_desc": "Ensure that the --authorization-mode argument includes Node (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to a value that includes Node.\n--authorization-mode=Node,RBAC\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to a value that includes Node.\n--authorization-mode=Node,RBAC\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--authorization-mode' has 'Node'"
},
{
"test_number": "1.2.9",
"test_desc": "Ensure that the --authorization-mode argument includes RBAC (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to a value that includes RBAC,\nfor example `--authorization-mode=Node,RBAC`.\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --authorization-mode parameter to a value that includes RBAC,\nfor example `--authorization-mode=Node,RBAC`.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--authorization-mode' has 'RBAC'"
},
{
"test_number": "1.2.10",
"test_desc": "Ensure that the admission control plugin EventRateLimit is set (Manual)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and set the desired limits in a configuration file.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\nand set the below parameters.\n--enable-admission-plugins=...,EventRateLimit,...\n--admission-control-config-file=\u003cpath/to/configuration/file\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and set the desired limits in a configuration file.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\nand set the below parameters.\n--enable-admission-plugins=...,EventRateLimit,...\n--admission-control-config-file=\u003cpath/to/configuration/file\u003e\n"
],
"status": "WARN",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": false,
"IsMultiple": false,
"expected_result": "'--enable-admission-plugins' has 'EventRateLimit'"
},
{
"test_number": "1.2.11",
"test_desc": "Ensure that the admission control plugin AlwaysAdmit is not set (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and either remove the --enable-admission-plugins parameter, or set it to a\nvalue that does not include AlwaysAdmit.\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and either remove the --enable-admission-plugins parameter, or set it to a\nvalue that does not include AlwaysAdmit.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--enable-admission-plugins' does not have 'AlwaysAdmit' OR '--enable-admission-plugins' is not present"
},
{
"test_number": "1.2.12",
"test_desc": "Ensure that the admission control plugin AlwaysPullImages is set (Manual)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to include\nAlwaysPullImages.\n--enable-admission-plugins=...,AlwaysPullImages,...\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to include\nAlwaysPullImages.\n--enable-admission-plugins=...,AlwaysPullImages,...\n"
],
"status": "WARN",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": false,
"IsMultiple": false,
"expected_result": "'--enable-admission-plugins' has 'AlwaysPullImages'"
},
{
"test_number": "1.2.13",
"test_desc": "Ensure that the admission control plugin SecurityContextDeny is set if PodSecurityPolicy is not used (Manual)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to include\nSecurityContextDeny, unless PodSecurityPolicy is already in place.\n--enable-admission-plugins=...,SecurityContextDeny,...\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to include\nSecurityContextDeny, unless PodSecurityPolicy is already in place.\n--enable-admission-plugins=...,SecurityContextDeny,...\n"
],
"status": "WARN",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": false,
"IsMultiple": false,
"expected_result": "'--enable-admission-plugins' has 'SecurityContextDeny' OR '--enable-admission-plugins' has 'PodSecurityPolicy'"
},
{
"test_number": "1.2.14",
"test_desc": "Ensure that the admission control plugin ServiceAccount is set (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the documentation and create ServiceAccount objects as per your environment.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and ensure that the --disable-admission-plugins parameter is set to a\nvalue that does not include ServiceAccount.\n",
"test_info": [
"Follow the documentation and create ServiceAccount objects as per your environment.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and ensure that the --disable-admission-plugins parameter is set to a\nvalue that does not include ServiceAccount.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--disable-admission-plugins' is present OR '--disable-admission-plugins' is not present"
},
{
"test_number": "1.2.15",
"test_desc": "Ensure that the admission control plugin NamespaceLifecycle is set (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --disable-admission-plugins parameter to\nensure it does not include NamespaceLifecycle.\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --disable-admission-plugins parameter to\nensure it does not include NamespaceLifecycle.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--disable-admission-plugins' is present OR '--disable-admission-plugins' is not present"
},
{
"test_number": "1.2.16",
"test_desc": "Ensure that the admission control plugin NodeRestriction is set (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and configure NodeRestriction plug-in on kubelets.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to a\nvalue that includes NodeRestriction.\n--enable-admission-plugins=...,NodeRestriction,...\n",
"test_info": [
"Follow the Kubernetes documentation and configure NodeRestriction plug-in on kubelets.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --enable-admission-plugins parameter to a\nvalue that includes NodeRestriction.\n--enable-admission-plugins=...,NodeRestriction,...\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--enable-admission-plugins' has 'NodeRestriction'"
},
{
"test_number": "1.2.17",
"test_desc": "Ensure that the --secure-port argument is not set to 0 (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and either remove the --secure-port parameter or\nset it to a different (non-zero) desired port.\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and either remove the --secure-port parameter or\nset it to a different (non-zero) desired port.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--secure-port' is greater than 0 OR '--secure-port' is not present"
},
{
"test_number": "1.2.18",
"test_desc": "Ensure that the --profiling argument is set to false (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--profiling=false\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--profiling=false\n"
],
"status": "FAIL",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--profiling' is present"
},
{
"test_number": "1.2.19",
"test_desc": "Ensure that the --audit-log-path argument is set (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-path parameter to a suitable path and\nfile where you would like audit logs to be written, for example,\n--audit-log-path=/var/log/apiserver/audit.log\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-path parameter to a suitable path and\nfile where you would like audit logs to be written, for example,\n--audit-log-path=/var/log/apiserver/audit.log\n"
],
"status": "FAIL",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--audit-log-path' is present"
},
{
"test_number": "1.2.20",
"test_desc": "Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxage parameter to 30\nor as an appropriate number of days, for example,\n--audit-log-maxage=30\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxage parameter to 30\nor as an appropriate number of days, for example,\n--audit-log-maxage=30\n"
],
"status": "FAIL",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--audit-log-maxage' is present"
},
{
"test_number": "1.2.21",
"test_desc": "Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxbackup parameter to 10 or to an appropriate\nvalue. For example,\n--audit-log-maxbackup=10\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxbackup parameter to 10 or to an appropriate\nvalue. For example,\n--audit-log-maxbackup=10\n"
],
"status": "FAIL",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--audit-log-maxbackup' is present"
},
{
"test_number": "1.2.22",
"test_desc": "Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxsize parameter to an appropriate size in MB.\nFor example, to set it as 100 MB, --audit-log-maxsize=100\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --audit-log-maxsize parameter to an appropriate size in MB.\nFor example, to set it as 100 MB, --audit-log-maxsize=100\n"
],
"status": "FAIL",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--audit-log-maxsize' is present"
},
{
"test_number": "1.2.23",
"test_desc": "Ensure that the --request-timeout argument is set as appropriate (Manual)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "manual",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\nand set the below parameter as appropriate and if needed.\nFor example, --request-timeout=300s\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\nand set the below parameter as appropriate and if needed.\nFor example, --request-timeout=300s\n"
],
"status": "WARN",
"actual_value": "",
"scored": false,
"IsMultiple": false,
"expected_result": "",
"reason": "Test marked as a manual test"
},
{
"test_number": "1.2.24",
"test_desc": "Ensure that the --service-account-lookup argument is set to true (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--service-account-lookup=true\nAlternatively, you can delete the --service-account-lookup parameter from this file so\nthat the default takes effect.\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--service-account-lookup=true\nAlternatively, you can delete the --service-account-lookup parameter from this file so\nthat the default takes effect.\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--service-account-lookup' is not present OR '--service-account-lookup' is present"
},
{
"test_number": "1.2.25",
"test_desc": "Ensure that the --service-account-key-file argument is set as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --service-account-key-file parameter\nto the public key file for service accounts. For example,\n--service-account-key-file=\u003cfilename\u003e\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --service-account-key-file parameter\nto the public key file for service accounts. For example,\n--service-account-key-file=\u003cfilename\u003e\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--service-account-key-file' is present"
},
{
"test_number": "1.2.26",
"test_desc": "Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the etcd certificate and key file parameters.\n--etcd-certfile=\u003cpath/to/client-certificate-file\u003e\n--etcd-keyfile=\u003cpath/to/client-key-file\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the etcd certificate and key file parameters.\n--etcd-certfile=\u003cpath/to/client-certificate-file\u003e\n--etcd-keyfile=\u003cpath/to/client-key-file\u003e\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--etcd-certfile' is present AND '--etcd-keyfile' is present"
},
{
"test_number": "1.2.27",
"test_desc": "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and set up the TLS connection on the apiserver.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the TLS certificate and private key file parameters.\n--tls-cert-file=\u003cpath/to/tls-certificate-file\u003e\n--tls-private-key-file=\u003cpath/to/tls-key-file\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and set up the TLS connection on the apiserver.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the TLS certificate and private key file parameters.\n--tls-cert-file=\u003cpath/to/tls-certificate-file\u003e\n--tls-private-key-file=\u003cpath/to/tls-key-file\u003e\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--tls-cert-file' is present AND '--tls-private-key-file' is present"
},
{
"test_number": "1.2.28",
"test_desc": "Ensure that the --client-ca-file argument is set as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and set up the TLS connection on the apiserver.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the client certificate authority file.\n--client-ca-file=\u003cpath/to/client-ca-file\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and set up the TLS connection on the apiserver.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the client certificate authority file.\n--client-ca-file=\u003cpath/to/client-ca-file\u003e\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--client-ca-file' is present"
},
{
"test_number": "1.2.29",
"test_desc": "Ensure that the --etcd-cafile argument is set as appropriate (Automated)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the etcd certificate authority file parameter.\n--etcd-cafile=\u003cpath/to/ca-file\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and set up the TLS connection between the apiserver and etcd.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the etcd certificate authority file parameter.\n--etcd-cafile=\u003cpath/to/ca-file\u003e\n"
],
"status": "PASS",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": true,
"IsMultiple": false,
"expected_result": "'--etcd-cafile' is present"
},
{
"test_number": "1.2.30",
"test_desc": "Ensure that the --encryption-provider-config argument is set as appropriate (Manual)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and configure a EncryptionConfig file.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --encryption-provider-config parameter to the path of that file.\nFor example, --encryption-provider-config=\u003c/path/to/EncryptionConfig/File\u003e\n",
"test_info": [
"Follow the Kubernetes documentation and configure a EncryptionConfig file.\nThen, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the --encryption-provider-config parameter to the path of that file.\nFor example, --encryption-provider-config=\u003c/path/to/EncryptionConfig/File\u003e\n"
],
"status": "WARN",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": false,
"IsMultiple": false,
"expected_result": "'--encryption-provider-config' is present"
},
{
"test_number": "1.2.31",
"test_desc": "Ensure that encryption providers are appropriately configured (Manual)",
"audit": "ENCRYPTION_PROVIDER_CONFIG=$(ps -ef | grep kube-apiserver | grep -- --encryption-provider-config | sed 's%.*encryption-provider-config[= ]\\([^ ]*\\).*%\\1%')\nif test -e $ENCRYPTION_PROVIDER_CONFIG; then grep -A1 'providers:' $ENCRYPTION_PROVIDER_CONFIG | tail -n1 | grep -o \"[A-Za-z]*\" | sed 's/^/provider=/'; fi\n",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Follow the Kubernetes documentation and configure a EncryptionConfig file.\nIn this file, choose aescbc, kms or secretbox as the encryption provider.\n",
"test_info": [
"Follow the Kubernetes documentation and configure a EncryptionConfig file.\nIn this file, choose aescbc, kms or secretbox as the encryption provider.\n"
],
"status": "WARN",
"actual_value": "",
"scored": false,
"IsMultiple": false,
"expected_result": "'provider' is present"
},
{
"test_number": "1.2.32",
"test_desc": "Ensure that the API Server only makes use of Strong Cryptographic Ciphers (Manual)",
"audit": "/bin/ps -ef | grep kube-apiserver | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--tls-cipher-suites=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,\nTLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,\nTLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,\nTLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,\nTLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,\nTLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,\nTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,\nTLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_GCM_SHA384\n",
"test_info": [
"Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml\non the control plane node and set the below parameter.\n--tls-cipher-suites=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,\nTLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,\nTLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,\nTLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,\nTLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,\nTLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,\nTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,\nTLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_256_GCM_SHA384\n"
],
"status": "WARN",
"actual_value": "root 1780 1693 11 12:20 ? 00:00:06 kube-apiserver --advertise-address=192.168.49.2 --allow-privileged=true --authorization-mode=Node,RBAC --client-ca-file=/var/lib/minikube/certs/ca.crt --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --enable-bootstrap-token-auth=true --etcd-cafile=/var/lib/minikube/certs/etcd/ca.crt --etcd-certfile=/var/lib/minikube/certs/apiserver-etcd-client.crt --etcd-keyfile=/var/lib/minikube/certs/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --kubelet-client-certificate=/var/lib/minikube/certs/apiserver-kubelet-client.crt --kubelet-client-key=/var/lib/minikube/certs/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/var/lib/minikube/certs/front-proxy-client.crt --proxy-client-key-file=/var/lib/minikube/certs/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=8443 --service-account-issuer=https://kubernetes.default.svc.cluster.local --service-account-key-file=/var/lib/minikube/certs/sa.pub --service-account-signing-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --tls-cert-file=/var/lib/minikube/certs/apiserver.crt --tls-private-key-file=/var/lib/minikube/certs/apiserver.key",
"scored": false,
"IsMultiple": false,
"expected_result": "'--tls-cipher-suites' is present"
}
]
},
{
"section": "1.3",
"type": "",
"pass": 5,
"fail": 1,
"warn": 1,
"info": 0,
"desc": "Controller Manager",
"results": [
{
"test_number": "1.3.1",
"test_desc": "Ensure that the --terminated-pod-gc-threshold argument is set as appropriate (Manual)",
"audit": "/bin/ps -ef | grep kube-controller-manager | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the --terminated-pod-gc-threshold to an appropriate threshold,\nfor example, --terminated-pod-gc-threshold=10\n",
"test_info": [
"Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the --terminated-pod-gc-threshold to an appropriate threshold,\nfor example, --terminated-pod-gc-threshold=10\n"
],
"status": "WARN",
"actual_value": "root 1759 1668 4 12:20 ? 00:00:02 kube-controller-manager --allocate-node-cidrs=true --authentication-kubeconfig=/etc/kubernetes/controller-manager.conf --authorization-kubeconfig=/etc/kubernetes/controller-manager.conf --bind-address=127.0.0.1 --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-cidr=10.244.0.0/16 --cluster-name=mk --cluster-signing-cert-file=/var/lib/minikube/certs/ca.crt --cluster-signing-key-file=/var/lib/minikube/certs/ca.key --controllers=*,bootstrapsigner,tokencleaner --kubeconfig=/etc/kubernetes/controller-manager.conf --leader-elect=false --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --root-ca-file=/var/lib/minikube/certs/ca.crt --service-account-private-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --use-service-account-credentials=true",
"scored": false,
"IsMultiple": false,
"expected_result": "'--terminated-pod-gc-threshold' is present"
},
{
"test_number": "1.3.2",
"test_desc": "Ensure that the --profiling argument is set to false (Automated)",
"audit": "/bin/ps -ef | grep kube-controller-manager | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the below parameter.\n--profiling=false\n",
"test_info": [
"Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node and set the below parameter.\n--profiling=false\n"
],
"status": "FAIL",
"actual_value": "root 1759 1668 4 12:20 ? 00:00:02 kube-controller-manager --allocate-node-cidrs=true --authentication-kubeconfig=/etc/kubernetes/controller-manager.conf --authorization-kubeconfig=/etc/kubernetes/controller-manager.conf --bind-address=127.0.0.1 --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-cidr=10.244.0.0/16 --cluster-name=mk --cluster-signing-cert-file=/var/lib/minikube/certs/ca.crt --cluster-signing-key-file=/var/lib/minikube/certs/ca.key --controllers=*,bootstrapsigner,tokencleaner --kubeconfig=/etc/kubernetes/controller-manager.conf --leader-elect=false --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --root-ca-file=/var/lib/minikube/certs/ca.crt --service-account-private-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --use-service-account-credentials=true",
"scored": true,
"IsMultiple": false,
"expected_result": "'--profiling' is present"
},
{
"test_number": "1.3.3",
"test_desc": "Ensure that the --use-service-account-credentials argument is set to true (Automated)",
"audit": "/bin/ps -ef | grep kube-controller-manager | grep -v grep",
"AuditEnv": "",
"AuditConfig": "",
"type": "",
"remediation": "Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node to set the below parameter.\n--use-service-account-credentials=true\n",
"test_info": [
"Edit the Controller Manager pod specification file /etc/kubernetes/manifests/kube-controller-manager.yaml\non the control plane node to set the below parameter.\n--use-service-account-credentials=true\n"
],
"status": "PASS",
"actual_value": "root 1759 1668 4 12:20 ? 00:00:02 kube-controller-manager --allocate-node-cidrs=true --authentication-kubeconfig=/etc/kubernetes/controller-manager.conf --authorization-kubeconfig=/etc/kubernetes/controller-manager.conf --bind-address=127.0.0.1 --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-cidr=10.244.0.0/16 --cluster-name=mk --cluster-signing-cert-file=/var/lib/minikube/certs/ca.crt --cluster-signing-key-file=/var/lib/minikube/certs/ca.key --controllers=*,bootstrapsigner,tokencleaner --kubeconfig=/etc/kubernetes/controller-manager.conf --leader-elect=false --requestheader-client-ca-file=/var/lib/minikube/certs/front-proxy-ca.crt --root-ca-file=/var/lib/minikube/certs/ca.crt --service-account-private-key-file=/var/lib/minikube/certs/sa.key --service-cluster-ip-range=10.96.0.0/12 --use-service-account-credentials=true",
"scored": true,
"IsMultiple": false,
"expected_result": "'--use-service-account-credentials' is not equal to 'false'"
},
{
"test_number": "1.3.4",