Debian Codegraph @

tests/API/XCCDF/unittests/test_remediation_kickstart_expected.cfg

raw symbols SCIP
1 ###############################################################################
2 #
3 # Kickstart for Common hardening profile
4 #
5 # Profile Description:
6 # This is a very cool profile
7 #
8 # Profile ID: xccdf_org.openscap.www_profile_common
9 # Benchmark ID: xccdf_org.openscap.www_benchmark_test
10 # Benchmark Version: 1.0
11 # XCCDF Version: 1.2
12 #
13 # This file was generated by OpenSCAP 1.4.0 using:
14 # $ oscap xccdf generate fix --profile xccdf_org.openscap.www_profile_common --fix-type kickstart TEST_DATA_STREAM_PATH
15 #
16 # This Kickstart is generated from an OpenSCAP profile without preliminary evaluation.
17 # It attempts to fix every selected rule, even if the system is already compliant.
18 #
19 # How to apply this Kickstart:
20 # Review the kickstart and customize the kickstart for your deployment.
21 # Pay attention to items marked as "required for security compliance".
22 # Install the operating system using this kickstart.
23 #
24 ###############################################################################
25
26
27 # Default values for automated installation (optional)
28 lang en_US.UTF-8
29 keyboard --vckeymap us
30 timezone --utc America/New_York
31
32 # Root password is required for system rescue tasks (optional)
33 rootpw changeme
34
35 # Create partition layout scheme (required for security compliance)
36 zerombr
37 clearpart --all --initlabel
38 reqpart --add-boot
39 part pv.01 --grow --size=1
40 volgroup system pv.01
41 logvol / --name=root --vgname=system --size=2000 --grow
42 logvol swap --name=swap --vgname=system --size=1000
43 logvol /var/tmp --name=vartmp --vgname=system --size=1024
44
45 # Configure boot loader options (required for security compliance)
46 bootloader --append="quick audit=1"
47
48 # Disable the kdump kernel crash dumping mechanism (required for security compliance)
49 %addon com_redhat_kdump --disable
50 %end
51
52 # Disable and enable services in firewall (required for security compliance)
53 firewall --remove-service=httpd --service=sshd
54
55 # Disable and enable systemd services (required for security compliance)
56 services --disabled=telnet,httpd --enabled=auditd,rsyslog,sshd
57
58 # Packages selection (required for security compliance)
59 %packages
60 openscap-scanner
61 scap-security-guide
62 rsyslog
63 openssh-server
64 podman
65 -usbguard
66 %end
67
68 # Perform OpenSCAP hardening (required for security compliance)
69 %post --erroronfail
70 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
71 [ $? -eq 0 -o $? -eq 2 ] || exit 1
72 %end
73
74 # Additional %post section (required for security compliance)
75 %post --nochroot
76 mkdir -p /etc/ddfds
77 %end
78
79 # Additional %post section (required for security compliance)
80 %post --nochroot
81 mkdir -p /etc/abcd
82 %end
83
84 # Additional %post section (required for security compliance)
85 %post
86 rm -rf /etc/xyz
87 # create a new path
88 feel /etc/xyz
89 %end
90
91 # Reboot after the installation is complete
92 reboot