File: cis_rhel8.yml

package info (click to toggle)
scap-security-guide 0.1.76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 110,644 kB
  • sloc: xml: 241,883; sh: 73,777; python: 32,527; makefile: 27
file content (3019 lines) | stat: -rw-r--r-- 80,557 bytes parent folder | download
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
---
policy: 'CIS Benchmark for Red Hat Enterprise Linux 8'
title: 'CIS Benchmark for Red Hat Enterprise Linux 8'
id: cis_rhel8
version: '3.0.0'
source: https://www.cisecurity.org/cis-benchmarks/#red_hat_linux
levels:
  - id: l1_server
  - id: l2_server
    inherits_from:
      - l1_server
  - id: l1_workstation
  - id: l2_workstation
    inherits_from:
      - l1_workstation
reference_type: cis
product: rhel8

controls:
  - id: reload_dconf_db
    title: Reload Dconf database
    levels:
      - l1_server
      - l1_workstation
    notes: <-
      This is a helper rule to reload Dconf database correctly.
    status: automated
    rules:
      - dconf_db_up_to_date

  - id: enable_authselect
    title: Enable Authselect
    levels:
      - l1_server
      - l1_workstation
    notes: <-
      We need this in all CIS versions, but the policy doesn't have any section where this would fit better.
    status: automated
    rules:
      - var_authselect_profile=sssd
      - enable_authselect

  - id: 1.1.1.1
    title: Ensure cramfs kernel module is not available (Automated)
    levels:
      - l1_workstation
      - l1_server
    status: automated
    rules:
      - kernel_module_cramfs_disabled

  - id: 1.1.1.2
    title: Ensure freevxfs kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_freevxfs_disabled

  - id: 1.1.1.3
    title: Ensure hfs kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_hfs_disabled

  - id: 1.1.1.4
    title: Ensure hfsplus kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_hfsplus_disabled

  - id: 1.1.1.5
    title: Ensure jffs2 kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_jffs2_disabled

  - id: 1.1.1.6
    title: Ensure squashfs kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_squashfs_disabled

  - id: 1.1.1.7
    title: Ensure udf kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_udf_disabled

  - id: 1.1.1.8
    title: Ensure usb-storage kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_usb-storage_disabled

  - id: 1.1.2.1.1
    title: Ensure /tmp is a separate partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - partition_for_tmp

  - id: 1.1.2.1.2
    title: Ensure nodev option set on /tmp partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_tmp_nodev

  - id: 1.1.2.1.3
    title: Ensure nosuid option set on /tmp partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_tmp_nosuid

  - id: 1.1.2.1.4
    title: Ensure noexec option set on /tmp partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_tmp_noexec

  - id: 1.1.2.2.1
    title: Ensure /dev/shm is a separate partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - partition_for_dev_shm

  - id: 1.1.2.2.2
    title: Ensure nodev option set on /dev/shm partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_dev_shm_nodev

  - id: 1.1.2.2.3
    title: Ensure nosuid option set on /dev/shm partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_dev_shm_nosuid

  - id: 1.1.2.2.4
    title: Ensure noexec option set on /dev/shm partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_dev_shm_noexec

  - id: 1.1.2.3.1
    title: Ensure separate partition exists for /home (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - partition_for_home

  - id: 1.1.2.3.2
    title: Ensure nodev option set on /home partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_home_nodev

  - id: 1.1.2.3.3
    title: Ensure nosuid option set on /home partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_home_nosuid

  - id: 1.1.2.4.1
    title: Ensure separate partition exists for /var (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - partition_for_var

  - id: 1.1.2.4.2
    title: Ensure nodev option set on /var partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_nodev

  - id: 1.1.2.4.3
    title: Ensure nosuid option set on /var partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_nosuid

  - id: 1.1.2.5.1
    title: Ensure separate partition exists for /var/tmp (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - partition_for_var_tmp

  - id: 1.1.2.5.2
    title: Ensure nodev option set on /var/tmp partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_tmp_nodev

  - id: 1.1.2.5.3
    title: Ensure nosuid option set on /var/tmp partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_tmp_nosuid

  - id: 1.1.2.5.4
    title: Ensure noexec option set on /var/tmp partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_tmp_noexec

  - id: 1.1.2.6.1
    title: Ensure separate partition exists for /var/log (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - partition_for_var_log

  - id: 1.1.2.6.2
    title: Ensure nodev option set on /var/log partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_log_nodev

  - id: 1.1.2.6.3
    title: Ensure nosuid option set on /var/log partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_log_nosuid

  - id: 1.1.2.6.4
    title: Ensure noexec option set on /var/log partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_log_noexec

  - id: 1.1.2.7.1
    title: Ensure separate partition exists for /var/log/audit (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - partition_for_var_log_audit

  - id: 1.1.2.7.2
    title: Ensure nodev option set on /var/log/audit partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_log_audit_nodev

  - id: 1.1.2.7.3
    title: Ensure nosuid option set on /var/log/audit partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_log_audit_nosuid

  - id: 1.1.2.7.4
    title: Ensure noexec option set on /var/log/audit partition (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - mount_option_var_log_audit_noexec

  - id: 1.2.1
    title: Ensure GPG keys are configured (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual
    related_rules:
      - ensure_redhat_gpgkey_installed

  - id: 1.2.2
    title: Ensure gpgcheck is globally activated (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - ensure_gpgcheck_globally_activated
      - ensure_gpgcheck_never_disabled

  - id: 1.2.3
    title: Ensure repo_gpgcheck is globally activated (Manual)
    levels:
      - l2_server
      - l2_workstation
    status: manual

  - id: 1.2.4
    title: Ensure package manager repositories are configured (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 1.2.5
    title: Ensure updates, patches, and additional security software are installed (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual
    related_rules:
      - security_patches_up_to_date

  - id: 1.3.1
    title: Ensure bootloader password is set (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - grub2_password
      - grub2_uefi_password

  - id: 1.3.2
    title: Ensure permissions on bootloader config are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_efi_grub2_cfg
      - file_groupowner_grub2_cfg
      - file_owner_efi_grub2_cfg
      - file_owner_grub2_cfg
      - file_permissions_efi_grub2_cfg
      - file_permissions_grub2_cfg
      - file_groupowner_efi_user_cfg
      - file_groupowner_user_cfg
      - file_owner_efi_user_cfg
      - file_owner_user_cfg
      - file_permissions_efi_user_cfg
      - file_permissions_user_cfg

  - id: 1.4.1
    title: Ensure address space layout randomization (ASLR) is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_kernel_randomize_va_space

  - id: 1.4.2
    title: Ensure ptrace_scope is restricted (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_kernel_yama_ptrace_scope

  - id: 1.4.3
    title: Ensure core dump backtraces are disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - coredump_disable_backtraces

  - id: 1.4.4
    title: Ensure core dump storage is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - coredump_disable_storage

  - id: 1.5.1.1
    title: Ensure SELinux is installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_libselinux_installed

  - id: 1.5.1.2
    title: Ensure SELinux is not disabled in bootloader configuration (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - grub2_enable_selinux

  - id: 1.5.1.3
    title: Ensure SELinux policy is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - var_selinux_policy_name=targeted
      - selinux_policytype

  - id: 1.5.1.4
    title: Ensure the SELinux mode is not disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - selinux_not_disabled

  - id: 1.5.1.5
    title: Ensure the SELinux mode is enforcing (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - var_selinux_state=enforcing
      - selinux_state

  - id: 1.5.1.6
    title: Ensure no unconfined services exist (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - selinux_confinement_of_daemons

  - id: 1.5.1.7
    title: Ensure the MCS Translation Service (mcstrans) is not installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_mcstrans_removed

  - id: 1.5.1.8
    title: Ensure SETroubleshoot is not installed (Automated)
    levels:
      - l1_server
    status: automated
    rules:
      - package_setroubleshoot_removed

  - id: 1.6.1
    title: Ensure system wide crypto policy is not set to legacy (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - configure_crypto_policy
      - var_system_crypto_policy=default_nosha1

  - id: 1.6.2
    title: Ensure system wide crypto policy disables sha1 hash and signature support (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      This requirement is already satisfied by 1.6.1.
    related_rules:
      - configure_crypto_policy

  - id: 1.6.3
    title: Ensure system wide crypto policy disables cbc for ssh (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: pending
    notes: |-
      It is necessary a new rule to ensure a module disabling CBC in
      /etc/crypto-policies/policies/modules/ so it can be used by update-crypto-policies command.
    related_rules:
      - configure_crypto_policy

  - id: 1.6.4
    title: Ensure system wide crypto policy disables macs less than 128 bits (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: pending
    notes: |-
      It is necessary a new rule to ensure a module disabling weak MACs in
      /etc/crypto-policies/policies/modules/ so it can be used by update-crypto-policies command.
    related_rules:
      - configure_crypto_policy

  - id: 1.7.1
    title: Ensure message of the day is configured properly (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - banner_etc_motd_cis
      - cis_banner_text=cis

  - id: 1.7.2
    title: Ensure local login warning banner is configured properly (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - banner_etc_issue_cis
      - cis_banner_text=cis

  - id: 1.7.3
    title: Ensure remote login warning banner is configured properly (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - banner_etc_issue_net_cis
      - cis_banner_text=cis

  - id: 1.7.4
    title: Ensure access to /etc/motd is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_etc_motd
      - file_owner_etc_motd
      - file_permissions_etc_motd

  - id: 1.7.5
    title: Ensure access to /etc/issue is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_etc_issue
      - file_owner_etc_issue
      - file_permissions_etc_issue

  - id: 1.7.6
    title: Ensure access to /etc/issue.net is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_etc_issue_net
      - file_owner_etc_issue_net
      - file_permissions_etc_issue_net

  - id: 1.8.1
    title: Ensure GNOME Display Manager is removed (Automated)
    levels:
      - l2_server
    status: automated
    rules:
      - package_gdm_removed

  - id: 1.8.2
    title: Ensure GDM login banner is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - dconf_gnome_banner_enabled
      - dconf_gnome_login_banner_text
      - login_banner_text=cis_banners

  - id: 1.8.3
    title: Ensure GDM disable-user-list option is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - dconf_gnome_disable_user_list

  - id: 1.8.4
    title: Ensure GDM screen locks when the user is idle (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - dconf_gnome_screensaver_idle_delay
      - dconf_gnome_screensaver_lock_delay
      - inactivity_timeout_value=15_minutes
      - var_screensaver_lock_delay=5_seconds

  - id: 1.8.5
    title: Ensure GDM screen locks cannot be overridden (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - dconf_gnome_session_idle_user_locks
      - dconf_gnome_screensaver_user_locks

  - id: 1.8.6
    title: Ensure GDM automatic mounting of removable media is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - dconf_gnome_disable_automount
      - dconf_gnome_disable_automount_open

  - id: 1.8.7
    title: Ensure GDM disabling automatic mounting of removable media is not overridden (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The same rules used in 1.8.6 are applicable here since they configure and also lock the
      settings.
    related_rules:
      - dconf_gnome_disable_automount
      - dconf_gnome_disable_automount_open

  - id: 1.8.8
    title: Ensure GDM autorun-never is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - dconf_gnome_disable_autorun

  - id: 1.8.9
    title: Ensure GDM autorun-never is not overridden (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The same rules used in 1.8.8 are applicable here since they configure and also lock the
      settings.
    related_rules:
      - dconf_gnome_disable_autorun

  - id: 1.8.10
    title: Ensure XDMCP is not enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - gnome_gdm_disable_xdmcp

  - id: 2.1.1
    title: Ensure time synchronization is in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_chrony_installed

  - id: 2.1.2
    title: Ensure chrony is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - chronyd_specify_remote_server
      - var_multiple_time_servers=rhel

  - id: 2.1.3
    title: Ensure chrony is not run as the root user (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - chronyd_run_as_chrony_user

  - id: 2.2.1
    title: Ensure autofs services are not in use (Automated)
    levels:
      - l1_server
      - l2_workstation
    status: automated
    rules:
      - service_autofs_disabled

  - id: 2.2.2
    title: Ensure avahi daemon services are not in use (Automated)
    levels:
      - l1_server
      - l2_workstation
    status: automated
    rules:
      - service_avahi-daemon_disabled
    related_rules:
      - package_avahi_removed

  - id: 2.2.3
    title: Ensure dhcp server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_dhcp_removed
    related_rules:
      - service_dhcpd_disabled

  - id: 2.2.4
    title: Ensure dns server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_bind_removed
    related_rules:
      - service_named_disabled

  - id: 2.2.5
    title: Ensure dnsmasq services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_dnsmasq_removed

  - id: 2.2.6
    title: Ensure samba file server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_samba_removed
    related_rules:
      - service_smb_disabled

  - id: 2.2.7
    title: Ensure ftp server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_vsftpd_removed
    related_rules:
      - service_vsftpd_disabled

  - id: 2.2.8
    title: Ensure message access server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_dovecot_removed
      - package_cyrus-imapd_removed
    related_rules:
      - service_dovecot_disabled
    # new rule would be nice to disable cyrus-imapd service

  - id: 2.2.9
    title: Ensure network file system services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - service_nfs_disabled
    related_rules:
      - package_nfs-utils_removed
    notes: |-
      Many of the libvirt packages used by Enterprise Linux virtualization are
      dependent on the nfs-utils package.

  - id: 2.2.10
    title: Ensure nis server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_ypserv_removed
    related_rules:
      - service_ypserv_disabled

  - id: 2.2.11
    title: Ensure print server services are not in use (Automated)
    levels:
      - l1_server
    status: automated
    rules:
      - service_cups_disabled
    related_rules:
      - package_cups_removed

  - id: 2.2.12
    title: Ensure rpcbind services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - service_rpcbind_disabled
    related_rules:
      - package_rpcbind_removed
    notes: |-
      Many of the libvirt packages used by Enterprise Linux virtualization, and
      the nfs-utils
      package used for The Network File System (NFS), are dependent on the rpcbind
      package.

  - id: 2.2.13
    title: Ensure rsync services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_rsync_removed
    related_rules:
      - service_rsyncd_disabled

  - id: 2.2.14
    title: Ensure snmp services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_net-snmp_removed
    related_rules:
      - service_snmpd_disabled

  - id: 2.2.15
    title: Ensure telnet server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_telnet-server_removed
    related_rules:
      - service_telnet_disabled

  - id: 2.2.16
    title: Ensure tftp server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_tftp-server_removed
    related_rules:
      - service_tftp_disabled

  - id: 2.2.17
    title: Ensure web proxy server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_squid_removed
    related_rules:
      - service_squid_disabled

  - id: 2.2.18
    title: Ensure web server services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_httpd_removed
      - package_nginx_removed
    related_rules:
      - service_httpd_disabled
    # rule would be nice to disable nginx service

  - id: 2.2.19
    title: Ensure xinetd services are not in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_xinetd_removed
    related_rules:
      - service_xinetd_disabled

  - id: 2.2.20
    title: Ensure X window server services are not in use (Automated)
    levels:
      - l2_server
    status: automated
    notes: >-
      The rule also configures correct run level to prevent unbootable system.
    rules:
      - package_xorg-x11-server-common_removed
      - xwindows_runlevel_target

  - id: 2.2.21
    title: Ensure mail transfer agents are configured for local-only mode (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: partial
    notes:  |-
      The rule has_nonlocal_mta currently checks for services listening only on
      port 25, but the policy checks also for ports 465 and 587
    rules:
      - postfix_network_listening_disabled
      - var_postfix_inet_interfaces=loopback-only
      - has_nonlocal_mta

  - id: 2.2.22
    title: Ensure only approved services are listening on a network interface (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 2.3.1
    title: Ensure ftp client is not installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_ftp_removed

  - id: 2.3.2
    title: Ensure LDAP client is not installed (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - package_openldap-clients_removed

  - id: 2.3.3
    title: Ensure NIS Client is not installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_ypbind_removed

  - id: 2.3.4
    title: Ensure telnet client is not installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_telnet_removed

  - id: 2.3.5
    title: Ensure tftp client is not installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_tftp_removed

  - id: 3.1.1
    title: Ensure IPv6 status is identified (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 3.1.2
    title: Ensure wireless interfaces are disabled (Automated)
    levels:
      - l1_server
    status: automated
    rules:
      - wireless_disable_interfaces

  - id: 3.1.3
    title: Ensure bluetooth services are not in use (Automated)
    levels:
      - l1_server
      - l2_workstation
    status: automated
    rules:
      - service_bluetooth_disabled

  - id: 3.2.1
    title: Ensure dccp kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_dccp_disabled

  - id: 3.2.2
    title: Ensure tipc kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_tipc_disabled

  - id: 3.2.3
    title: Ensure rds kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_rds_disabled

  - id: 3.2.4
    title: Ensure sctp kernel module is not available (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - kernel_module_sctp_disabled

  - id: 3.3.1
    title: Ensure ip forwarding is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_ip_forward
      - sysctl_net_ipv6_conf_all_forwarding
      - sysctl_net_ipv6_conf_all_forwarding_value=disabled

  - id: 3.3.2
    title: Ensure packet redirect sending is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_conf_all_send_redirects
      - sysctl_net_ipv4_conf_default_send_redirects

  - id: 3.3.3
    title: Ensure bogus icmp responses are ignored (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_icmp_ignore_bogus_error_responses
      - sysctl_net_ipv4_icmp_ignore_bogus_error_responses_value=enabled

  - id: 3.3.4
    title: Ensure broadcast icmp requests are ignored(Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_icmp_echo_ignore_broadcasts
      - sysctl_net_ipv4_icmp_echo_ignore_broadcasts_value=enabled

  - id: 3.3.5
    title: Ensure icmp redirects are not accepted (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_conf_all_accept_redirects
      - sysctl_net_ipv4_conf_all_accept_redirects_value=disabled
      - sysctl_net_ipv4_conf_default_accept_redirects
      - sysctl_net_ipv4_conf_default_accept_redirects_value=disabled
      - sysctl_net_ipv6_conf_all_accept_redirects
      - sysctl_net_ipv6_conf_all_accept_redirects_value=disabled
      - sysctl_net_ipv6_conf_default_accept_redirects
      - sysctl_net_ipv6_conf_default_accept_redirects_value=disabled

  - id: 3.3.6
    title: Ensure secure icmp redirects are not accepted (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_conf_all_secure_redirects
      - sysctl_net_ipv4_conf_all_secure_redirects_value=disabled
      - sysctl_net_ipv4_conf_default_secure_redirects
      - sysctl_net_ipv4_conf_default_secure_redirects_value=disabled

  - id: 3.3.7
    title: Ensure reverse path filtering is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_conf_all_rp_filter
      - sysctl_net_ipv4_conf_all_rp_filter_value=enabled
      - sysctl_net_ipv4_conf_default_rp_filter
      - sysctl_net_ipv4_conf_default_rp_filter_value=enabled

  - id: 3.3.8
    title: Ensure source routed packets are not accepted (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_conf_all_accept_source_route
      - sysctl_net_ipv4_conf_all_accept_source_route_value=disabled
      - sysctl_net_ipv4_conf_default_accept_source_route
      - sysctl_net_ipv4_conf_default_accept_source_route_value=disabled
      - sysctl_net_ipv6_conf_all_accept_source_route
      - sysctl_net_ipv6_conf_all_accept_source_route_value=disabled
      - sysctl_net_ipv6_conf_default_accept_source_route
      - sysctl_net_ipv6_conf_default_accept_source_route_value=disabled

  - id: 3.3.9
    title: Ensure suspicious packets are logged (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_conf_all_log_martians
      - sysctl_net_ipv4_conf_all_log_martians_value=enabled
      - sysctl_net_ipv4_conf_default_log_martians
      - sysctl_net_ipv4_conf_default_log_martians_value=enabled

  - id: 3.3.10
    title: Ensure tcp sync cookies is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv4_tcp_syncookies
      - sysctl_net_ipv4_tcp_syncookies_value=enabled

  - id: 3.3.11
    title: Ensure IPv6 router advertisements are not accepted (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sysctl_net_ipv6_conf_all_accept_ra
      - sysctl_net_ipv6_conf_all_accept_ra_value=disabled
      - sysctl_net_ipv6_conf_default_accept_ra
      - sysctl_net_ipv6_conf_default_accept_ra_value=disabled

  - id: 3.4.1.1
    title: Ensure nftables is installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_nftables_installed

  - id: 3.4.1.2
    title: Ensure a single firewall configuration utility is in use (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - service_firewalld_enabled
      - package_firewalld_installed
      - service_nftables_disabled

  - id: 3.4.2.1
    title: Ensure nftables base chains exist (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: supported
    notes: |-
      RHEL systems use firewalld for firewall management. Although nftables is the default
      back-end for firewalld, it is not recommended to use nftables directly when firewalld
      is in use. When using firewalld the base chains are installed by default.
    related_rules:
      - set_nftables_base_chain
      - var_nftables_table=firewalld
      - var_nftables_family=inet
      - var_nftables_base_chain_names=chain_names
      - var_nftables_base_chain_types=chain_types
      - var_nftables_base_chain_hooks=chain_hooks
      - var_nftables_base_chain_priorities=chain_priorities
      - var_nftables_base_chain_policies=chain_policies

  - id: 3.4.2.2
    title: Ensure host based firewall loopback traffic is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - firewalld_loopback_traffic_trusted
      - firewalld_loopback_traffic_restricted

  - id: 3.4.2.3
    title: Ensure firewalld drops unnecessary services and ports (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 3.4.2.4
    title: Ensure nftables established connections are configured (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: supported
    notes: |-
      RHEL systems use firewalld for firewall management. Although nftables is the default
      back-end for firewalld, it is not recommended to use nftables directly when firewalld
      is in use. When using firewalld the base chains are installed by default.
    related_rules:
    - set_nftables_new_connections

  - id: 3.4.2.5
    title: Ensure nftables default deny firewall policy (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: supported
    notes: |-
      RHEL systems use firewalld for firewall management. Although nftables is the default
      back-end for firewalld, it is not recommended to use nftables directly when firewalld
      is in use.
    related_rules:
      - nftables_ensure_default_deny_policy

  - id: 4.1.1.1
    title: Ensure cron daemon is enabled and active (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - service_crond_enabled

  - id: 4.1.1.2
    title: Ensure permissions on /etc/crontab are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_crontab
      - file_owner_crontab
      - file_permissions_crontab

  - id: 4.1.1.3
    title: Ensure permissions on /etc/cron.hourly are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_cron_hourly
      - file_owner_cron_hourly
      - file_permissions_cron_hourly

  - id: 4.1.1.4
    title: Ensure permissions on /etc/cron.daily are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_cron_daily
      - file_owner_cron_daily
      - file_permissions_cron_daily

  - id: 4.1.1.5
    title: Ensure permissions on /etc/cron.weekly are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_cron_weekly
      - file_owner_cron_weekly
      - file_permissions_cron_weekly

  - id: 4.1.1.6
    title: Ensure permissions on /etc/cron.monthly are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_cron_monthly
      - file_owner_cron_monthly
      - file_permissions_cron_monthly

  - id: 4.1.1.7
    title: Ensure permissions on /etc/cron.d are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_cron_d
      - file_owner_cron_d
      - file_permissions_cron_d

  - id: 4.1.1.8
    title: Ensure cron is restricted to authorized users (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_cron_deny_not_exist
      - file_cron_allow_exists
      - file_groupowner_cron_allow
      - file_owner_cron_allow
      - file_permissions_cron_allow

  - id: 4.1.2.1
    title: Ensure at is restricted to authorized users (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: partial
    notes: |-
      It is necessary to create a rule to ensure the existence of at.allow.
      file_cron_allow_exists can be used as reference for a new templated rule.
    rules:
      - file_at_deny_not_exist
      - file_groupowner_at_allow
      - file_owner_at_allow
      - file_permissions_at_allow

  - id: 4.2.1
    title: Ensure permissions on /etc/ssh/sshd_config are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: partial
    notes: |-
      These rules only check the /etc/ssh/sshd_config file but the policy also mentions files in
      /etc/ssh/sshd_config.d directory. New templated rules should be created for sshd_config.d.
    rules:
      - file_groupowner_sshd_config
      - file_owner_sshd_config
      - file_permissions_sshd_config

  - id: 4.2.2
    title: Ensure permissions on SSH private host key files are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_permissions_sshd_private_key
      - file_ownership_sshd_private_key
      - file_groupownership_sshd_private_key

  - id: 4.2.3
    title: Ensure permissions on SSH public host key files are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_permissions_sshd_pub_key
      - file_ownership_sshd_pub_key
      - file_groupownership_sshd_pub_key

  - id: 4.2.4
    title: Ensure sshd access is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_limit_user_access

  - id: 4.2.5
    title: Ensure sshd Banner is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_enable_warning_banner_net
    related_rules:
      - sshd_enable_warning_banner

  - id: 4.2.6
    title: Ensure sshd Ciphers are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      Introduced in CIS RHEL8 v3.0.0
    rules:
      - sshd_use_approved_ciphers
      - sshd_approved_ciphers=cis_rhel8

  - id: 4.2.7
    title: Ensure sshd ClientAliveInterval and ClientAliveCountMax are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The requirement gives an example of 45 seconds, but is flexible about the values. It is only
      necessary to ensure there is a timeout is configured in alignment to the site policy.
    rules:
      - sshd_idle_timeout_value=5_minutes
      - sshd_set_idle_timeout
      - sshd_set_keepalive
      - var_sshd_set_keepalive=1

  - id: 4.2.8
    title: Ensure sshd DisableForwarding is enabled (Automated)
    levels:
      - l2_server
      - l1_workstation
    status: pending
    notes: |-
      New templated rule is necessary for "disableforwarding" option.
    related_rules:
      - sshd_disable_tcp_forwarding
      - sshd_disable_x11_forwarding

  - id: 4.2.9
    title: Ensure sshd HostbasedAuthentication is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - disable_host_auth

  - id: 4.2.10
    title: Ensure sshd IgnoreRhosts is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_disable_rhosts

  - id: 4.2.11
    title: Ensure sshd KexAlgorithms is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_use_strong_kex
      - sshd_strong_kex=cis_rhel8

  - id: 4.2.12
    title: Ensure sshd LoginGraceTime is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_set_login_grace_time
      - var_sshd_set_login_grace_time=60

  - id: 4.2.13
    title: Ensure sshd LogLevel is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The CIS benchmark is not opinionated about which loglevel is selected here. Here, this
      profile uses VERBOSE by default, as it allows for the capture of login and logout activity
      as well as key fingerprints.
    rules:
      - sshd_set_loglevel_verbose
    related_rules:
      - sshd_set_loglevel_info

  - id: 4.2.14
    title: Ensure sshd MACs are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_use_strong_macs
      - sshd_strong_macs=cis_rhel8

  - id: 4.2.15
    title: Ensure sshd MaxAuthTries is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_max_auth_tries_value=4
      - sshd_set_max_auth_tries

  - id: 4.2.16
    title: Ensure sshd MaxSessions is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_set_max_sessions
      - var_sshd_max_sessions=10

  - id: 4.2.17
    title: Ensure sshd MaxStartups is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_set_maxstartups
      - var_sshd_set_maxstartups=10:30:60

  - id: 4.2.18
    title: Ensure sshd PermitEmptyPasswords is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_disable_empty_passwords

  - id: 4.2.19
    title: Ensure sshd PermitRootLogin is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_disable_root_login

  - id: 4.2.20
    title: Ensure sshd PermitUserEnvironment is disabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_do_not_permit_user_env

  - id: 4.2.21
    title: Ensure sshd UsePAM is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sshd_enable_pam

  - id: 4.2.22
    title: Ensure sshd crypto_policy is not set (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - configure_ssh_crypto_policy

  - id: 4.3.1
    title: Ensure sudo is installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_sudo_installed

  - id: 4.3.2
    title: Ensure sudo commands use pty (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sudo_add_use_pty

  - id: 4.3.3
    title: Ensure sudo log file exists (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sudo_custom_logfile

  - id: 4.3.4
    title: Ensure users must provide password for escalation (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    notes: |-
      The rule sudo_require_authentication can probably be split to better attend requirements
      4.3.4 and 4.3.5.
    rules:
      - sudo_require_authentication

  - id: 4.3.5
    title: Ensure re-authentication for privilege escalation is not disabled globally (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The rule sudo_require_authentication can probably be split to better attend requirements
      4.3.4 and 4.3.5.
    rules:
      - sudo_require_authentication

  - id: 4.3.6
    title: Ensure sudo authentication timeout is configured correctly (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - sudo_require_reauthentication

  - id: 4.3.7
    title: Ensure access to the su command is restricted (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      Members of "wheel" or GID 0 groups are checked by default if the group option is not set for
      pam_wheel.so module. The recommendation states the group should be empty to reinforce the
      use of "sudo" for privileged access. Therefore, members of these groups should be manually
      checked or a different group should be informed.
    rules:
      - var_pam_wheel_group_for_su=cis
      - use_pam_wheel_group_for_su
      - ensure_pam_wheel_group_empty

  - id: 4.4.1.1
    title: Ensure latest version of pam is installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: pending
    notes: |-
      It is necessary a new rule to ensure PAM package is updated.

  - id: 4.4.1.2
    title: Ensure latest version of authselect is installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: pending
    notes: |-
      It is necessary a new rule to ensure PAM package is updated.

  - id: 4.4.2.1
    title: Ensure active authselect profile includes pam modules (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: partial
    notes: |-
      This requirement is hard to be automated without any specific requirement. The policy even
      states that provided commands are examples, other custom settings might be in place and the
      settings might be different depending on site policies. The other rules will already make
      sure there is a correct autheselect profile regardless of the existing settings. It is
      necessary to better discuss with CIS Community.
    related_rules:
      - no_empty_passwords

  - id: 4.4.2.2
    title: Ensure pam_faillock module is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      This requirement is also indirectly satisfied by the requirement 4.4.3.1.
    rules:
      - account_password_pam_faillock_password_auth
      - account_password_pam_faillock_system_auth

  - id: 4.4.2.3
    title: Ensure pam_pwquality module is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      CIS requirement asks to enable an authselect feature called "with-pwquality" but this
      feature is not present in RHEL 8. This needs to be discussed in CIS Community. For now the
      requirement is attended by ensuring the libpwquality is present. Its configuration is
      covered by other requirements.
    rules:
      - package_pam_pwquality_installed

  - id: 4.4.2.4
    title: Ensure pam_pwhistory module is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The module is properly enabled by the rules mentioned in related_rules.
      Requirements in 4.4.3.3 use these rules.
    related_rules:
      - accounts_password_pam_pwhistory_remember_password_auth
      - accounts_password_pam_pwhistory_remember_system_auth

  - id: 4.4.2.5
    title: Ensure pam_unix module is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: partial
    notes: |-
      This module is always present by default. It is necessary to investigate if a new rule to
      check its existence needs to be created. But so far the rule no_empty_passwords, used in
      4.4.3.4.1 can ensure this requirement is attended.
    related_rules:
      - no_empty_passwords

  - id: 4.4.3.1.1
    title: Ensure password failed attempts lockout is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_passwords_pam_faillock_deny
      - var_accounts_passwords_pam_faillock_deny=5

  - id: 4.4.3.1.2
    title: Ensure password unlock time is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The policy also accepts value 0, which means the locked accounts should be manually unlocked
      by an administrator. However, it also mentions that using value 0 can facilitate a DoS
      attack to legitimate users.
    rules:
      - accounts_passwords_pam_faillock_unlock_time
      - var_accounts_passwords_pam_faillock_unlock_time=900

  - id: 4.4.3.1.3
    title: Ensure password failed attempts lockout includes root account (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - accounts_passwords_pam_faillock_deny_root

  - id: 4.4.3.2.1
    title: Ensure password number of changed characters is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_password_pam_difok
      - var_password_pam_difok=2

  - id: 4.4.3.2.2
    title: Ensure password length is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_password_pam_minlen
      - var_password_pam_minlen=14

  - id: 4.4.3.2.3
    title: Ensure password complexity is configured (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      This requirement is expected to be manual. However, in previous versions of the policy
      it was already automated the configuration of "minclass" option. This posture was kept for
      RHEL 8 in this new version. Rules related to other options are informed in related_rules.
      In short, minclass=4 alone can achieve the same result achieved by the combination of the
      other 4 options mentioned in the policy.
    rules:
      - accounts_password_pam_minclass
      - var_password_pam_minclass=4
    related_rules:
      - accounts_password_pam_dcredit
      - accounts_password_pam_lcredit
      - accounts_password_pam_ocredit
      - accounts_password_pam_ucredit

  - id: 4.4.3.2.4
    title: Ensure password same consecutive characters is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_password_pam_maxrepeat
      - var_password_pam_maxrepeat=3

  - id: 4.4.3.2.5
    title: Ensure password maximum sequential characters is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: planned
    notes: |-
      A new templated rule and variable are necessary for the maxsequence option.

  - id: 4.4.3.2.6
    title: Ensure password dictionary check is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_password_pam_dictcheck
      - var_password_pam_dictcheck=1

  - id: 4.4.3.2.7
    title: Ensure password quality is enforced for the root user (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_password_pam_enforce_root

  - id: 4.4.3.3.1
    title: Ensure password history remember is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      Although mentioned in the section 4.4.3.3, there is no explicit requirement to configure
      retry option of pam_pwhistory. If come in the future, the rule accounts_password_pam_retry
      can be used.
    rules:
      - accounts_password_pam_pwhistory_remember_password_auth
      - accounts_password_pam_pwhistory_remember_system_auth
      - var_password_pam_remember_control_flag=requisite_or_required
      - var_password_pam_remember=24
    related_rules:
      - accounts_password_pam_retry

  - id: 4.4.3.3.2
    title: Ensure password history is enforced for the root user (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: planned
    notes: |-
      A new rule needs to be created to check and remediate the enforce_for_root option in
      /etc/security/pwhistory.conf. accounts_password_pam_enforce_root can be used as reference.

  - id: 4.4.3.3.3
    title: Ensure pam_pwhistory includes use_authtok (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: partial
    notes: |-
      In RHEL 8 pam_pwhistory is enabled via authselect feature, as required in 4.4.3.3.1. The
      feature automatically set "use_authok" option. In any case, we don't have a rule to check
      this option specifically.
    related_rules:
      - accounts_password_pam_pwhistory_remember_password_auth
      - accounts_password_pam_pwhistory_remember_system_auth

  - id: 4.4.3.4.1
    title: Ensure pam_unix does not include nullok (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      The rule more specifically used in this requirement also satify the requirements 4.4.2.1
      and 4.4.2.5.
    rules:
      - no_empty_passwords

  - id: 4.4.3.4.2
    title: Ensure pam_unix does not include remember (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: pending
    notes: |-
      Usage of pam_unix.so module together with "remember" option is deprecated and is not
      recommened by this policy. Instead, it should be used remember option of pam_pwhistory
      module, as required in 4.4.3.3.1. See here for more details about pam_unix.so:
      https://bugzilla.redhat.com/show_bug.cgi?id=1778929
      A new rule needs to be created to remove the remember option from pam_unix module.

  - id: 4.4.3.4.3
    title: Ensure pam_unix includes a strong password hashing algorithm (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      Changes in logindefs mentioned in this requirement are more specifically covered by 4.5.1.1.
    rules:
      - set_password_hashing_algorithm_systemauth
      - set_password_hashing_algorithm_passwordauth
      - var_password_hashing_algorithm_pam=sha512

  - id: 4.4.3.4.4
    title: Ensure pam_unix includes use_authtok (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: partial
    notes: |-
      In RHEL 8 pam_unix is enabled by default in all authselect profiles already with the
      use_authtok option set. In any case, we don't have a rule to check this option specifically,
      like in 4.4.3.3.3.

  - id: 4.5.1.1
    title: Ensure strong password hashing algorithm is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - set_password_hashing_algorithm_libuserconf
      - set_password_hashing_algorithm_logindefs
      - var_password_hashing_algorithm=SHA512
      - var_password_hashing_algorithm_pam=sha512

  - id: 4.5.1.2
    title: Ensure password expiration is 365 days or less (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_maximum_age_login_defs
      - accounts_password_set_max_life_existing
      - var_accounts_maximum_age_login_defs=365

  - id: 4.5.1.3
    title: Ensure password expiration warning days is 7 or more (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_password_set_warn_age_existing
      - accounts_password_warn_age_login_defs
      - var_accounts_password_warn_age_login_defs=7

  - id: 4.5.1.4
    title: Ensure inactive password lock is 30 days or less (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - account_disable_post_pw_expiration
      - accounts_set_post_pw_existing
      - var_account_disable_post_pw_expiration=30

  - id: 4.5.1.5
    title: Ensure all users last password change date is in the past (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_password_last_change_is_in_past

  - id: 4.5.2.1
    title: Ensure default group for the root account is GID 0 (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_root_gid_zero

  - id: 4.5.2.2
    title: Ensure root user umask is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: pending
    notes: |-
      There is no rule to ensure umask in /root/.bash_profile and /root/.bashrc. A new rule have
      to be created. It can be based on accounts_umask_interactive_users.

  - id: 4.5.2.3
    title: Ensure system accounts are secured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - no_password_auth_for_systemaccounts
      - no_shelllogin_for_systemaccounts

  - id: 4.5.2.4
    title: Ensure root password is set (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - ensure_root_password_configured

  - id: 4.5.3.1
    title: Ensure nologin is not listed in /etc/shells (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: pending
    notes: |-
      It is necessary to create a new rule to check and remove nologin from /etc/shells.
      The no_tmux_in_shells rule can be used as referece.

  - id: 4.5.3.2
    title: Ensure default user shell timeout is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_tmout
      - var_accounts_tmout=15_min

  - id: 4.5.3.3
    title: Ensure default user umask is configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      It is missing a rule to check /etc/pam.d/postlogin. Files /etc/bash.bashrc and
      /etc/default/login are not used in RHEL 8, but are mentioned in the policy. It has to be
      clarified in CIS Community. The policy allows the user to override the default system umask
      on its discretion. This is the reason the accounts_umask_interactive_users rule is in
      related_rules. If this changes in the future, the rule can be used to ensure that users do
      not override the system default.
    rules:
      - accounts_umask_etc_bashrc
      - accounts_umask_etc_login_defs
      - accounts_umask_etc_profile
      - var_accounts_user_umask=027
    related_rules:
      - accounts_umask_interactive_users

  - id: 5.1.1.1
    title: Ensure rsyslog is installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_rsyslog_installed

  - id: 5.1.1.2
    title: Ensure rsyslog service is enabled (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    notes: |-
      This requirement is expected to be manual in the policy because there are valid cases where
      other solutions are used for logging. rsyslog is the default in RHEL 8 and so far other
      solutions are not expected to be incompatible with rsyslog. If so, for these particular
      cases, this rule should be removed for those systems by a tailored file.
    rules:
      - service_rsyslog_enabled

  - id: 5.1.1.3
    title: Ensure journald is configured to send logs to rsyslog (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - journald_forward_to_syslog

  - id: 5.1.1.4
    title: Ensure rsyslog default file permissions are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - rsyslog_filecreatemode

  - id: 5.1.1.5
    title: Ensure logging is configured (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 5.1.1.6
    title: Ensure rsyslog is configured to send logs to a remote log host (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual
    related_rules:
      - rsyslog_remote_loghost

  - id: 5.1.1.7
    title: Ensure rsyslog is not configured to recieve logs from a remote client (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - rsyslog_nolisten

  - id: 5.1.2.1.1
    title: Ensure systemd-journal-remote is installed (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual
    related_rules:
      - package_systemd-journal-remote_installed

  - id: 5.1.2.1.2
    title: Ensure systemd-journal-remote is configured (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 5.1.2.1.3
    title: Ensure systemd-journal-remote is enabled (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 5.1.2.1.4
    title: Ensure journald is not configured to recieve logs from a remote client (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - socket_systemd-journal-remote_disabled

  - id: 5.1.2.2
    title: Ensure journald service is enabled (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - service_systemd-journald_enabled

  - id: 5.1.2.3
    title: Ensure journald is configured to compress large log files (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - journald_compress

  - id: 5.1.2.4
    title: Ensure journald is configured to write logfiles to persistent disk (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - journald_storage

  - id: 5.1.2.5
    title: Ensure journald is not configured to send logs to rsyslog (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 5.1.2.6
    title: Ensure journald log rotation is configured per site policy (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual

  - id: 5.1.3
    title: Ensure logrotate is configured (Manual)
    levels:
      - l1_server
      - l1_workstation
    status: manual
    related_rules:
      - ensure_logrotate_activated
      - package_logrotate_installed
      - timer_logrotate_enabled

  - id: 5.1.4
    title: Ensure all logfiles have appropriate access configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - rsyslog_files_groupownership
      - rsyslog_files_ownership
      - rsyslog_files_permissions

  - id: 5.2.1.1
    title: Ensure audit is installed (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - package_audit_installed

  - id: 5.2.1.2
    title: Ensure auditing for processes that start prior to auditd is enabled (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - grub2_audit_argument

  - id: 5.2.1.3
    title: Ensure audit_backlog_limit is sufficient (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - grub2_audit_backlog_limit_argument

  - id: 5.2.1.4
    title: Ensure auditd service is enabled (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - service_auditd_enabled

  - id: 5.2.2.1
    title: Ensure audit log storage size is configured (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - auditd_data_retention_max_log_file
      - var_auditd_max_log_file=6

  - id: 5.2.2.2
    title: Ensure audit logs are not automatically deleted (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - auditd_data_retention_max_log_file_action
      - var_auditd_max_log_file_action=keep_logs

  - id: 5.2.2.3
    title: Ensure system is disabled when audit logs are full (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - auditd_data_disk_error_action
      - auditd_data_disk_full_action
      - var_auditd_disk_error_action=cis_rhel8
      - var_auditd_disk_full_action=cis_rhel8

  - id: 5.2.2.4
    title: Ensure system warns when audit logs are low on space (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - auditd_data_retention_action_mail_acct
      - auditd_data_retention_admin_space_left_action
      - auditd_data_retention_space_left_action
      - var_auditd_action_mail_acct=root
      - var_auditd_admin_space_left_action=cis_rhel8
      - var_auditd_space_left_action=cis_rhel8

  - id: 5.2.3.1
    title: Ensure changes to system administration scope (sudoers) is collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_sysadmin_actions

  - id: 5.2.3.2
    title: Ensure actions as another user are always logged (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_suid_auid_privilege_function

  - id: 5.2.3.3
    title: Ensure events that modify the sudo log file are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_sudo_log_events

  - id: 5.2.3.4
    title: Ensure events that modify date and time information are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_time_adjtimex
      - audit_rules_time_settimeofday
      - audit_rules_time_clock_settime
      - audit_rules_time_stime
      - audit_rules_time_watch_localtime

  - id: 5.2.3.5
    title: Ensure events that modify the system's network environment are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
    - audit_rules_networkconfig_modification
    - audit_rules_networkconfig_modification_network_scripts

  - id: 5.2.3.6
    title: Ensure use of privileged commands are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_privileged_commands

  - id: 5.2.3.7
    title: Ensure unsuccessful file access attempts are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_unsuccessful_file_modification_creat
      - audit_rules_unsuccessful_file_modification_ftruncate
      - audit_rules_unsuccessful_file_modification_open
      - audit_rules_unsuccessful_file_modification_openat
      - audit_rules_unsuccessful_file_modification_truncate

  - id: 5.2.3.8
    title: Ensure events that modify user/group information are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_usergroup_modification_group
      - audit_rules_usergroup_modification_gshadow
      - audit_rules_usergroup_modification_opasswd
      - audit_rules_usergroup_modification_passwd
      - audit_rules_usergroup_modification_shadow

  - id: 5.2.3.9
    title: Ensure discretionary access control permission modification events are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_dac_modification_chmod
      - audit_rules_dac_modification_chown
      - audit_rules_dac_modification_fchmod
      - audit_rules_dac_modification_fchmodat
      - audit_rules_dac_modification_fchown
      - audit_rules_dac_modification_fchownat
      - audit_rules_dac_modification_fremovexattr
      - audit_rules_dac_modification_fsetxattr
      - audit_rules_dac_modification_lchown
      - audit_rules_dac_modification_lremovexattr
      - audit_rules_dac_modification_lsetxattr
      - audit_rules_dac_modification_removexattr
      - audit_rules_dac_modification_setxattr

  - id: 5.2.3.10
    title: Ensure successful file system mounts are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_media_export

  - id: 5.2.3.11
    title: Ensure session initiation information is collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_session_events

  - id: 5.2.3.12
    title: Ensure login and logout events are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_login_events_faillock
      - audit_rules_login_events_lastlog
      - var_accounts_passwords_pam_faillock_dir=run

  - id: 5.2.3.13
    title: Ensure file deletion events by users are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_file_deletion_events_rename
      - audit_rules_file_deletion_events_renameat
      - audit_rules_file_deletion_events_unlink
      - audit_rules_file_deletion_events_unlinkat

  - id: 5.2.3.14
    title: Ensure events that modify the system's Mandatory Access Controls are collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_mac_modification
      - audit_rules_mac_modification_usr_share

  - id: 5.2.3.15
    title: Ensure successful and unsuccessful attempts to use the chcon command are recorded (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_execution_chcon

  - id: 5.2.3.16
    title: Ensure successful and unsuccessful attempts to use the setfacl command are recorded (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_execution_setfacl

  - id: 5.2.3.17
    title: Ensure successful and unsuccessful attempts to use the chacl command are recorded (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_execution_chacl

  - id: 5.2.3.18
    title: Ensure successful and unsuccessful attempts to use the usermod command are recorded (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_privileged_commands_usermod

  - id: 5.2.3.19
    title: Ensure kernel module loading, unloading and modification is collected (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_kernel_module_loading_create
      - audit_rules_kernel_module_loading_delete
      - audit_rules_kernel_module_loading_finit
      - audit_rules_kernel_module_loading_init
      - audit_rules_kernel_module_loading_query
      - audit_rules_privileged_commands_kmod

  - id: 5.2.3.20
    title: Ensure the audit configuration is immutable (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - audit_rules_immutable

  - id: 5.2.3.21
    title: Ensure the running and on disk configuration is the same (Manual)
    levels:
      - l2_server
      - l2_workstation
    status: manual

  - id: 5.2.4.1
    title: Ensure the audit log directory is 0750 or more restrictive (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - directory_permissions_var_log_audit

  - id: 5.2.4.2
    title: Ensure audit log files are mode 0640 or less permissive (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_permissions_var_log_audit

  - id: 5.2.4.3
    title: Ensure only authorized users own audit log files (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_ownership_var_log_audit_stig

  - id: 5.2.4.4
    title: Ensure only authorized groups are assigned ownership of audit log files (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_group_ownership_var_log_audit

  - id: 5.2.4.5
    title: Ensure audit configuration files are 640 or more restrictive (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_permissions_audit_configuration

  - id: 5.2.4.6
    title: Ensure audit configuration files are owned by root (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_ownership_audit_configuration

  - id: 5.2.4.7
    title: Ensure audit configuration files belong to group root (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_groupownership_audit_configuration

  - id: 5.2.4.8
    title: Ensure audit tools are 755 or more restrictive (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_permissions_audit_binaries

  - id: 5.2.4.9
    title: Ensure audit tools are owned by root (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_ownership_audit_binaries

  - id: 5.2.4.10
    title: Ensure audit tools belong to group root (Automated)
    levels:
      - l2_server
      - l2_workstation
    status: automated
    rules:
      - file_groupownership_audit_binaries

  - id: 5.3.1
    title: Ensure AIDE is installed (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - package_aide_installed
      - aide_build_database

  - id: 5.3.2
    title: Ensure filesystem integrity is regularly checked (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - aide_periodic_cron_checking
    related_rules:
      - aide_periodic_checking_systemd_timer

  - id: 5.3.3
    title: Ensure cryptographic mechanisms are used to protect the integrity of audit tools (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - aide_check_audit_tools
    related_rules:
      - aide_use_fips_hashes

  - id: 6.1.1
    title: Ensure permissions on /etc/passwd are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_etc_passwd
      - file_owner_etc_passwd
      - file_permissions_etc_passwd

  - id: 6.1.2
    title: Ensure permissions on /etc/passwd- are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_backup_etc_passwd
      - file_owner_backup_etc_passwd
      - file_permissions_backup_etc_passwd

  - id: 6.1.3
    title: Ensure permissions on /etc/security/opasswd are configured (Automated)
    levels:
    - l1_server
    - l1_workstation
    status: partial
    rules:
    # TODO: We need another rule that checks /etc/security/opasswd.old
    - file_etc_security_opasswd

  - id: 6.1.4
    title: Ensure permissions on /etc/group are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_etc_group
      - file_owner_etc_group
      - file_permissions_etc_group

  - id: 6.1.5
    title: Ensure permissions on /etc/group- are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_backup_etc_group
      - file_owner_backup_etc_group
      - file_permissions_backup_etc_group

  - id: 6.1.6
    title: Ensure permissions on /etc/shadow are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_owner_etc_shadow
      - file_groupowner_etc_shadow
      - file_permissions_etc_shadow

  - id: 6.1.7
    title: Ensure permissions on /etc/shadow- are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_backup_etc_shadow
      - file_owner_backup_etc_shadow
      - file_permissions_backup_etc_shadow

  - id: 6.1.8
    title: Ensure permissions on /etc/gshadow are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_etc_gshadow
      - file_owner_etc_gshadow
      - file_permissions_etc_gshadow

  - id: 6.1.9
    title: Ensure permissions on /etc/gshadow- are configured (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - file_groupowner_backup_etc_gshadow
      - file_owner_backup_etc_gshadow
      - file_permissions_backup_etc_gshadow

  - id: 6.1.10
    title: Ensure permissions on /etc/shells are configured (Automated)
    levels:
    - l1_server
    - l1_workstation
    status: automated
    rules:
      - file_groupowner_etc_shells
      - file_owner_etc_shells
      - file_permissions_etc_shells

  - id: 6.1.11
    title: Ensure world writable files and directories are secured (Automated)
    levels:
    - l1_server
    - l1_workstation
    status: automated
    rules:
    - file_permissions_unauthorized_world_writable
    - dir_perms_world_writable_sticky_bits

  - id: 6.1.12
    title: Ensure no unowned or ungrouped files or directories exist (Automated)
    levels:
    - l1_server
    - l1_workstation
    status: partial
    rules:
    # TODO: add rules for unowned/ungrouped directories
    - no_files_unowned_by_user
    - file_permissions_ungroupowned

  - id: 6.1.13
    title: Ensure SUID and SGID files are reviewed (Manual)
    levels:
    - l1_server
    - l1_workstation
    status: manual
    related_rules:
      - file_permissions_unauthorized_suid
      - file_permissions_unauthorized_sgid

  - id: 6.1.14
    title: Audit system file permissions (Manual)
    levels:
      - l2_server
      - l2_workstation
    status: manual
    related_rules:
      - rpm_verify_permissions
      - rpm_verify_ownership

  - id: 6.2.1
    title: Ensure accounts in /etc/passwd use shadowed passwords (Automated)
    levels:
    - l1_server
    - l1_workstation
    status: automated
    rules:
    - accounts_password_all_shadowed

  - id: 6.2.2
    title: Ensure /etc/shadow password fields are not empty (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - no_empty_passwords_etc_shadow

  - id: 6.2.3
    title: Ensure all groups in /etc/passwd exist in /etc/group (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - gid_passwd_group_same

  - id: 6.2.4
    title: Ensure no duplicate UIDs exist (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - account_unique_id

  - id: 6.2.5
    title: Ensure no duplicate GIDs exist (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - group_unique_id

  - id: 6.2.6
    title: Ensure no duplicate user names exist (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - account_unique_name

  - id: 6.2.7
    title: Ensure no duplicate group names exist (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - group_unique_name

  - id: 6.2.8
    title: Ensure root path integrity (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_root_path_dirs_no_write
      - root_path_no_dot

  - id: 6.2.9
    title: Ensure root is the only UID 0 account (Automated)
    levels:
      - l1_server
      - l1_workstation
    status: automated
    rules:
      - accounts_no_uid_except_zero

  - id: 6.2.10
    title: Ensure local interactive user home directories are configured (Automated)
    levels:
    - l1_server
    - l1_workstation
    status: automated
    rules:
    - accounts_user_interactive_home_directory_exists
    - file_ownership_home_directories
    - file_permissions_home_directories

  - id: 6.2.11
    title: Ensure local interactive user dot files access is configured (Automated)
    levels:
    - l1_server
    - l1_workstation
    notes: |-
      According to the RHEL 8 CIS Benchmark guidance, the incompliant .forward
      and .rhost files should be investigated and remediated manually.
      However, in other profiles we remediate the rule using the automated
      remediation.
    status: partial
    # TODO: add rule checking that .bash_history is mode 0600 or more restrictive
    rules:
    - accounts_user_dot_group_ownership
    - accounts_user_dot_user_ownership
    - file_permission_user_init_files
    - var_user_initialization_files_regex=all_dotfiles
    - no_forward_files
    - no_rsh_trust_files
    - accounts_users_netrc_file_permissions