############################################################################### # # Kickstart for Common hardening profile # # Profile Description: # This is a very cool profile # # Profile ID: xccdf_org.openscap.www_profile_common # Benchmark ID: xccdf_org.openscap.www_benchmark_test # Benchmark Version: 1.0 # XCCDF Version: 1.2 # # This file was generated by OpenSCAP 1.4.0 using: # $ oscap xccdf generate fix --profile xccdf_org.openscap.www_profile_common --fix-type kickstart TEST_DATA_STREAM_PATH # # This Kickstart is generated from an OpenSCAP profile without preliminary evaluation. # It attempts to fix every selected rule, even if the system is already compliant. # # How to apply this Kickstart: # Review the kickstart and customize the kickstart for your deployment. # Pay attention to items marked as "required for security compliance". # Install the operating system using this kickstart. # ############################################################################### # Default values for automated installation (optional) lang en_US.UTF-8 keyboard --vckeymap us timezone --utc America/New_York # Root password is required for system rescue tasks (optional) rootpw changeme # Create partition layout scheme (required for security compliance) zerombr clearpart --all --initlabel reqpart --add-boot part pv.01 --grow --size=1 volgroup system pv.01 logvol / --name=root --vgname=system --size=2000 --grow logvol swap --name=swap --vgname=system --size=1000 logvol /var/tmp --name=vartmp --vgname=system --size=1024 # Configure boot loader options (required for security compliance) bootloader --append="quick audit=1" # Disable the kdump kernel crash dumping mechanism (required for security compliance) %addon com_redhat_kdump --disable %end # Disable and enable services in firewall (required for security compliance) firewall --remove-service=httpd --service=sshd # Disable and enable systemd services (required for security compliance) services --disabled=telnet,httpd --enabled=auditd,rsyslog,sshd # Packages selection (required for security compliance) %packages openscap-scanner scap-security-guide rsyslog openssh-server podman -usbguard %end # Perform OpenSCAP hardening (required for security compliance) %post --erroronfail oscap xccdf eval --remediate --results-arf /root/oscap_arf.xml --report /root/oscap_report.html --profile 'xccdf_org.openscap.www_profile_common' /usr/share/xml/scap/ssg/content/test_remediation_kickstart.ds.xml [ $? -eq 0 -o $? -eq 2 ] || exit 1 %end # Additional %post section (required for security compliance) %post --nochroot mkdir -p /etc/ddfds %end # Additional %post section (required for security compliance) %post --nochroot mkdir -p /etc/abcd %end # Additional %post section (required for security compliance) %post rm -rf /etc/xyz # create a new path feel /etc/xyz %end # Reboot after the installation is complete reboot