Debian Codegraph @

tests/API/XCCDF/applicability/test_report_anaconda_fixes.xccdf.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <Benchmark xmlns="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 id="xccdf_moc.elpmaxe.www_benchmark_test" resolved="1">
4 <status>accepted</status>
5 <version>1.0</version>
6 <model system="urn:xccdf:scoring:default"/>
7 <Profile id="xccdf_moc.elpmaxe.www_profile_1">
8 <title>Some arbitrary hardening profile for anaconda testing</title>
9 <select idref="xccdf_moc.elpmaxe.www_group_1" selected="true"/>
10 <select idref="xccdf_moc.elpmaxe.www_rule_3" selected="true"/>
11 <refine-value idref="xccdf_moc.elpmaxe.www_value_1" selector="len14"/>
12 </Profile>
13 <Rule id="xccdf_moc.elpmaxe.www_rule_1" selected="true">
14 <title>Ensure /tmp Located On Separate Partition</title>
15 <ident system="http://cce.mitre.org">CCE-14161-4</ident>
16 <fix id="partition_for_tmp_fix_anaconda_pre" system="urn:redhat:anaconda:pre" platform="cpe:/o:example:applicable:5">
17 <!--the system attribute identifies that this fix is for anaconda before installation-->
18 part /tmp
19 </fix>
20 <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5">
21 <check-content-ref href="oval_without_definitions.oval.xml"/>
22 </check>
23 </Rule>
24 <Rule id="xccdf_moc.elpmaxe.www_rule_2" selected="true">
25 <title>Add nodev Option to /tmp</title>
26 <ident system="http://cce.mitre.org">CCE-14412-1</ident>
27 <fix id="mount_option_tmp_fix_anaconda_pre" system="urn:redhat:anaconda:pre" platform="cpe:/o:example:applicable:5">
28 part /tmp --mountoptions=nodev
29 </fix>
30 <fix id="mount_option_tmp_fix" system="urn:xccdf:script:sh">
31 <!--should run either post-install or during firstboot-->
32 grep -e '^[^#].*/tmp.*nodev' /etc/fstab
33 if [ "$?" -ne 0 ]; then
34 new_fstab=$(cat /etc/fstab | sed -e 's%^[^#]([^ ]+)\s+/tmp([^ ]+)\s+([^ ]+)\s+(\d)\s+(\d)%\1\t/tmp\2\t\3,nodev\t\4 \5'
35 echo $new_fstab > /etc/fstab
36 fi
37 </fix>
38 </Rule>
39 <Group id="xccdf_moc.elpmaxe.www_group_1" selected="false">
40 <Value id="xccdf_moc.elpmaxe.www_value_1">
41 <title>Minimal password length</title>
42 <value selector="len8">8</value>
43 <value selector="len14">14</value>
44 <value selector="len18">18</value>
45 </Value>
46 <Rule id="xccdf_moc.elpmaxe.www_rule_3">
47 <title>Set Password Minimum Length in login.defs</title>
48 <fix xmlns:xhtml="http://www.w3.org/1999/xhtml" system="urn:redhat:anaconda:pre" platform="cpe:/o:example:applicable:5">
49 <!--effect passwords created during installation-->
50 passwd --minlen=<sub idref="xccdf_moc.elpmaxe.www_value_1"/>
51 </fix>
52 <fix id="password_min_len_fix" system="urn:xccdf:script:python">
53 <!--should run either post-install or during firstboot-->
54 <!--python script to set
55 PASS_MIN_LEN=<sub idref="xccdf_moc.elpmaxe.www_value_1"/> in /etc/login.defs
56 and
57 minlen=<sub idref="xccdf_moc.elpmaxe.www_value_1"/> in /etc/security/pwquality.conf
58 -->
59 </fix>
60 </Rule>
61 </Group>
62 </Benchmark>