Skip to content

Commit 3d1294d

Browse files
authored
Merge pull request #21 from omok314159/issue20
Changed several files for fixing issue20
2 parents 98a0006 + 0f1aab6 commit 3d1294d

31 files changed

Lines changed: 7969 additions & 2615 deletions

ComplianceAsCode/content_for_supporting_rocky8/files/diff_content_for_supporting_rocky8

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
diff -Nru content.org/CMakeLists.txt content/CMakeLists.txt
2-
--- content.org/CMakeLists.txt 2021-05-03 07:27:49.961754374 +0900
3-
+++ content/CMakeLists.txt 2021-05-03 07:29:29.739430343 +0900
4-
@@ -92,6 +92,7 @@
2+
--- content.org/CMakeLists.txt 2021-08-21 18:13:55.050097584 +0900
3+
+++ content/CMakeLists.txt 2021-08-21 18:21:16.258038611 +0900
4+
@@ -93,6 +93,7 @@
55
option(SSG_PRODUCT_VSEL "If enabled, the McAfee VSEL SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
66
option(SSG_PRODUCT_WRLINUX8 "If enabled, the WRLinux8 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
77
option(SSG_PRODUCT_WRLINUX1019 "If enabled, the WRLinux1019 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
88
+option(SSG_PRODUCT_ROCKY8 "If enabled, the ROCKY8 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
9-
9+
1010
option(SSG_CENTOS_DERIVATIVES_ENABLED "If enabled, CentOS derivative content will be built from the RHEL content" TRUE)
1111
option(SSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED "If enabled, Scientific Linux derivative content will be built from the RHEL content" TRUE)
12-
@@ -285,6 +286,7 @@
12+
@@ -288,6 +289,7 @@
1313
message(STATUS "McAfee VSEL: ${SSG_PRODUCT_VSEL}")
1414
message(STATUS "WRLinux 8: ${SSG_PRODUCT_WRLINUX8}")
1515
message(STATUS "WRLinux 1019: ${SSG_PRODUCT_WRLINUX1019}")
1616
+message(STATUS "ROCKY 8: ${SSG_PRODUCT_ROCKY8}")
17-
18-
19-
20-
@@ -407,6 +409,10 @@
17+
18+
19+
20+
@@ -410,6 +412,10 @@
2121
if (SSG_PRODUCT_WRLINUX1019)
2222
add_subdirectory("products/wrlinux1019" "wrlinux1019")
2323
endif()
2424
+if (SSG_PRODUCT_ROCKY8)
2525
+ add_subdirectory("products/rocky8" "rocky8")
2626
+endif()
2727
+
28-
28+
2929
# ZIP only contains source datastreams and kickstarts, people who
3030
# want sources to build from should get the tarball instead.
3131

3232
diff -Nru content.org/build_product content/build_product
33-
--- content.org/build_product 2021-05-03 07:27:50.029755540 +0900
34-
+++ content/build_product 2021-05-03 07:29:29.739430343 +0900
35-
@@ -309,6 +309,7 @@
36-
VSEL
33+
--- content.org/build_product 2021-08-21 18:13:55.110097683 +0900
34+
+++ content/build_product 2021-08-21 18:22:19.417937147 +0900
35+
@@ -310,6 +310,7 @@
3736
WRLINUX8
3837
WRLINUX1019
38+
MACOS1015
3939
+ ROCKY8
4040
)
4141

@@ -52,9 +52,15 @@ diff -Nru content.org/shared/checks/oval/install_mcafee_hbss.xml content/shared/
5252
<description>McAfee Host-Based Intrusion Detection Software (HBSS) software
5353
should be installed.</description>
5454
diff -Nru content.org/shared/checks/oval/sysctl_kernel_ipv6_disable.xml content/shared/checks/oval/sysctl_kernel_ipv6_disable.xml
55-
--- content.org/shared/checks/oval/sysctl_kernel_ipv6_disable.xml 2021-05-03 07:27:50.325760613 +0900
56-
+++ content/shared/checks/oval/sysctl_kernel_ipv6_disable.xml 2021-05-03 07:30:19.808247714 +0900
57-
@@ -14,6 +14,7 @@
55+
--- content.org/shared/checks/oval/sysctl_kernel_ipv6_disable.xml 2021-08-21 18:13:55.326098038 +0900
56+
+++ content/shared/checks/oval/sysctl_kernel_ipv6_disable.xml 2021-08-21 18:21:37.030007098 +0900
57+
@@ -9,11 +9,12 @@
58+
<platform>multi_platform_opensuse</platform>
59+
<platform>multi_platform_ol</platform>
60+
<platform>multi_platform_rhcos</platform>
61+
- <platform>multi_platform_rhel</platform>
62+
+ <platform>multi_platform_rhel,multi_platform_rocky</platform>
63+
<platform>multi_platform_rhv</platform>
5864
<platform>multi_platform_sle</platform>
5965
<platform>multi_platform_ubuntu</platform>
6066
<platform>multi_platform_wrlinux</platform>
@@ -63,8 +69,8 @@ diff -Nru content.org/shared/checks/oval/sysctl_kernel_ipv6_disable.xml content/
6369
<description>Disables IPv6 for all network interfaces.</description>
6470
</metadata>
6571
diff -Nru content.org/ssg/constants.py content/ssg/constants.py
66-
--- content.org/ssg/constants.py 2021-05-03 07:27:50.369761368 +0900
67-
+++ content/ssg/constants.py 2021-05-03 07:29:29.739430343 +0900
72+
--- content.org/ssg/constants.py 2021-08-21 18:13:55.362098097 +0900
73+
+++ content/ssg/constants.py 2021-08-21 18:21:16.258038611 +0900
6874
@@ -24,7 +24,8 @@
6975
'sle12', 'sle15',
7076
'ubuntu1604', 'ubuntu1804', 'ubuntu2004',
@@ -73,38 +79,36 @@ diff -Nru content.org/ssg/constants.py content/ssg/constants.py
7379
+ 'wrlinux8', 'wrlinux1019',
7480
+ 'rocky8'
7581
]
76-
82+
7783
JINJA_MACROS_BASE_DEFINITIONS = os.path.join(os.path.dirname(os.path.dirname(
78-
@@ -181,6 +182,7 @@
84+
@@ -182,6 +183,7 @@
7985
"Ubuntu 20.04": "ubuntu2004",
8086
"WRLinux 8": "wrlinux8",
8187
"WRLinux 1019": "wrlinux1019",
8288
+ "Rocky Linux 8": "rocky8",
8389
}
84-
85-
86-
@@ -195,7 +197,7 @@
90+
91+
92+
@@ -196,7 +198,7 @@
8793
}
88-
94+
8995
MULTI_PLATFORM_LIST = ["rhel", "fedora", "rhosp", "rhv", "debian", "ubuntu",
9096
- "wrlinux", "opensuse", "sle", "ol", "ocp", "rhcos", "example"]
9197
+ "wrlinux", "opensuse", "sle", "ol", "ocp", "rhcos", "rocky", "example"]
92-
98+
9399
MULTI_PLATFORM_MAPPING = {
94100
"multi_platform_debian": ["debian9", "debian10"],
95-
@@ -211,6 +213,7 @@
101+
@@ -212,6 +214,7 @@
96102
"multi_platform_sle": ["sle12", "sle15"],
97103
"multi_platform_ubuntu": ["ubuntu1604", "ubuntu1804", "ubuntu2004"],
98104
"multi_platform_wrlinux": ["wrlinux8", "wrlinux1019"],
99-
+ "multi_platform_wrlinux": ["rocky8"],
105+
+ "multi_platform_rocky": ["rocky8"],
100106
}
101-
107+
102108
RHEL_CENTOS_CPE_MAPPING = {
103-
@@ -376,6 +379,7 @@
109+
@@ -377,6 +380,7 @@
104110
'ol': 'Oracle Linux',
105111
'ocp': 'Red Hat OpenShift Container Platform',
106112
'rhcos': 'Red Hat Enterprise Linux CoreOS',
107113
+ 'rocky': 'Rocky Linux',
108114
}
109-
110-

ComplianceAsCode/content_for_supporting_rocky8/files/disa-stig-rocky8-v1r3-xccdf-manual.xml

Lines changed: 6915 additions & 0 deletions
Large diffs are not rendered by default.

ComplianceAsCode/content_for_supporting_rocky8/files/rocky8/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ ssg_build_html_cce_table(${PRODUCT})
2727

2828
ssg_build_html_srgmap_tables(${PRODUCT} "stig" ${DISA_SRG_TYPE})
2929

30-
ssg_build_html_stig_tables(${PRODUCT} "stig")
30+
ssg_build_html_stig_tables(${PRODUCT})
31+
ssg_build_html_stig_tables_per_profile( ${PRODUCT} "stig")
32+
ssg_build_html_stig_tables_per_profile( ${PRODUCT} "stig_gui")
3133

3234
#ssg_build_html_stig_tables(${PRODUCT} "ospp")
3335

ComplianceAsCode/content_for_supporting_rocky8/files/rocky8/kickstart/ssg-rhel8-cis-ks.cfg

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
# SCAP Security Guide CIS profile kickstart for Red Hat Enterprise Linux 8 Server
1+
# SCAP Security Guide CIS profile (Level 2 - Server) kickstart for Red Hat Enterprise Linux 8 Server
22
# Version: 0.0.1
3-
# Date: 2020-03-30
3+
# Date: 2021-08-12
44
#
55
# Based on:
66
# https://pykickstart.readthedocs.io/en/latest/
77
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart
88

9-
# Install a fresh new system (optional)
10-
install
11-
129
# Specify installation method to use for installation
1310
# To use a different one comment out the 'url' one below, update
1411
# the selected choice with proper options & un-comment it
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# SCAP Security Guide CIS profile (Level 1 - Server) kickstart for Red Hat Enterprise Linux 8 Server
2+
# Version: 0.0.1
3+
# Date: 2021-08-12
4+
#
5+
# Based on:
6+
# https://pykickstart.readthedocs.io/en/latest/
7+
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart
8+
9+
# Specify installation method to use for installation
10+
# To use a different one comment out the 'url' one below, update
11+
# the selected choice with proper options & un-comment it
12+
#
13+
# Install from an installation tree on a remote server via FTP or HTTP:
14+
# --url the URL to install from
15+
#
16+
# Example:
17+
#
18+
# url --url=http://192.168.122.1/image
19+
#
20+
# Modify concrete URL in the above example appropriately to reflect the actual
21+
# environment machine is to be installed in
22+
#
23+
# Other possible / supported installation methods:
24+
# * install from the first CD-ROM/DVD drive on the system:
25+
#
26+
# cdrom
27+
#
28+
# * install from a directory of ISO images on a local drive:
29+
#
30+
# harddrive --partition=hdb2 --dir=/tmp/install-tree
31+
#
32+
# * install from provided NFS server:
33+
#
34+
# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
35+
#
36+
37+
# Set language to use during installation and the default language to use on the installed system (required)
38+
lang en_US.UTF-8
39+
40+
# Set system keyboard type / layout (required)
41+
keyboard us
42+
43+
# Configure network information for target system and activate network devices in the installer environment (optional)
44+
# --onboot enable device at a boot time
45+
# --device device to be activated and / or configured with the network command
46+
# --bootproto method to obtain networking configuration for device (default dhcp)
47+
# --noipv6 disable IPv6 on this device
48+
#
49+
# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
50+
# "--bootproto=static" must be used. For example:
51+
# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
52+
#
53+
network --onboot yes --device eth0 --bootproto dhcp --noipv6
54+
55+
# Set the system's root password (required)
56+
# Plaintext password is: server
57+
# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
58+
# encrypted password form for different plaintext password
59+
rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
60+
61+
# The selected profile will restrict root login
62+
# Add a user that can login and escalate privileges
63+
# Plaintext password is: admin123
64+
user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
65+
66+
# Configure firewall settings for the system (optional)
67+
# --enabled reject incoming connections that are not in response to outbound requests
68+
# --ssh allow sshd service through the firewall
69+
firewall --enabled --ssh
70+
71+
# Set up the authentication options for the system (required)
72+
# sssd profile sets sha512 to hash passwords
73+
# passwords are shadowed by default
74+
# See the manual page for authselect-profile for a complete list of possible options.
75+
authselect select sssd
76+
77+
# State of SELinux on the installed system (optional)
78+
# Defaults to enforcing
79+
selinux --enforcing
80+
81+
# Set the system time zone (required)
82+
timezone --utc America/New_York
83+
84+
# Specify how the bootloader should be installed (required)
85+
# Plaintext password is: password
86+
# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
87+
# encrypted password form for different plaintext password
88+
bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0
89+
90+
# Initialize (format) all disks (optional)
91+
zerombr
92+
93+
# The following partition layout scheme assumes disk of size 20GB or larger
94+
# Modify size of partitions appropriately to reflect actual machine's hardware
95+
#
96+
# Remove Linux partitions from the system prior to creating new ones (optional)
97+
# --linux erase all Linux partitions
98+
# --initlabel initialize the disk label to the default based on the underlying architecture
99+
clearpart --linux --initlabel
100+
101+
# Create primary system partitions (required for installs)
102+
part /boot --fstype=xfs --size=512
103+
part pv.01 --grow --size=1
104+
105+
# Create a Logical Volume Management (LVM) group (optional)
106+
volgroup VolGroup --pesize=4096 pv.01
107+
108+
# Create particular logical volumes (optional)
109+
logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=10240 --grow
110+
# Ensure /tmp Located On Separate Partition
111+
logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
112+
logvol swap --name=lv_swap --vgname=VolGroup --size=2016
113+
114+
115+
# Harden installation with CIS profile
116+
# For more details and configuration options see
117+
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program
118+
%addon org_fedora_oscap
119+
content-type = scap-security-guide
120+
profile = xccdf_org.ssgproject.content_profile_cis_server_l1
121+
%end
122+
123+
# Packages selection (%packages section is required)
124+
%packages
125+
126+
# Require @Base
127+
@Base
128+
129+
%end # End of %packages section
130+
131+
# Reboot after the installation is complete (optional)
132+
# --eject attempt to eject CD or DVD media before rebooting
133+
reboot --eject

0 commit comments

Comments
 (0)