Debian Codegraph @

tests/API/XCCDF/unittests/test_report_anaconda_fixes.sds.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="utf-8"?>
2 <ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_test_report_anaconda_fixes.xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_test_report_anaconda_fixes.xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_test_report_anaconda_fixes.xccdf.xml" xlink:href="#scap_org.open-scap_comp_test_report_anaconda_fixes.xccdf.xml"><cat:catalog><cat:uri name="oval_without_definitions.oval.xml" uri="#scap_org.open-scap_cref_oval_without_definitions.oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_oval_without_definitions.oval.xml" xlink:href="#scap_org.open-scap_comp_oval_without_definitions.oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_oval_without_definitions.oval.xml" timestamp="2023-11-03T13:47:12"><oval_definitions xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:lin-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd">
3 <generator>
4 <oval:product_name>Text Editors</oval:product_name>
5 <oval:schema_version>5.8</oval:schema_version>
6 <oval:timestamp>2010-06-08T12:00:00-04:00</oval:timestamp>
7 </generator>
8 <tests>
9 <unix-def:file_test check_existence="all_exist" id="oval:moc.elpmaxe.www:tst:1" version="1" check="all" comment="Testing permissions on ./not_executable">
10 <unix-def:object object_ref="oval:moc.elpmaxe.www:obj:1"/>
11 <unix-def:state state_ref="oval:moc.elpmaxe.www:ste:1"/>
12 </unix-def:file_test>
13 <unix-def:file_test check_existence="all_exist" id="oval:moc.elpmaxe.www:tst:2" version="1" check="all" comment="Testing permissions on ./not_executable">
14 <unix-def:object object_ref="oval:moc.elpmaxe.www:obj:1"/>
15 <unix-def:state state_ref="oval:moc.elpmaxe.www:ste:2"/>
16 </unix-def:file_test>
17 </tests>
18 <objects>
19 <unix-def:file_object id="oval:moc.elpmaxe.www:obj:1" version="1" comment="not_executable">
20 <unix-def:path>./</unix-def:path>
21 <unix-def:filename>not_executable</unix-def:filename>
22 </unix-def:file_object>
23 </objects>
24 <states>
25 <unix-def:file_state id="oval:moc.elpmaxe.www:ste:1" version="1">
26 <unix-def:oexec datatype="boolean">false</unix-def:oexec>
27 </unix-def:file_state>
28 <unix-def:file_state id="oval:moc.elpmaxe.www:ste:2" version="1">
29 <unix-def:oexec datatype="boolean">true</unix-def:oexec>
30 </unix-def:file_state>
31 </states>
32 </oval_definitions></ds:component><ds:component id="scap_org.open-scap_comp_test_report_anaconda_fixes.xccdf.xml" timestamp="2023-11-03T13:47:12"><Benchmark xmlns="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_moc.elpmaxe.www_benchmark_test" resolved="1">
33 <status>accepted</status>
34 <version>1.0</version>
35 <model system="urn:xccdf:scoring:default"/>
36 <Profile id="xccdf_moc.elpmaxe.www_profile_1">
37 <title>Some arbitrary hardening profile for anaconda testing</title>
38 <select idref="xccdf_moc.elpmaxe.www_group_1" selected="true"/>
39 <select idref="xccdf_moc.elpmaxe.www_rule_3" selected="true"/>
40 <refine-value idref="xccdf_moc.elpmaxe.www_value_1" selector="len14"/>
41 </Profile>
42 <Rule id="xccdf_moc.elpmaxe.www_rule_1" selected="true">
43 <title>Ensure /tmp Located On Separate Partition</title>
44 <ident system="http://cce.mitre.org">CCE-14161-4</ident>
45 <fix id="partition_for_tmp_fix_anaconda_pre" system="urn:redhat:anaconda:pre">
46 <!--the system attribute identifies that this fix is for anaconda before installation-->
47 part /tmp
48 </fix>
49 <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5">
50 <check-content-ref href="oval_without_definitions.oval.xml"/>
51 </check>
52 </Rule>
53 <Rule id="xccdf_moc.elpmaxe.www_rule_2" selected="true">
54 <title>Add nodev Option to /tmp</title>
55 <ident system="http://cce.mitre.org">CCE-14412-1</ident>
56 <fix id="mount_option_tmp_fix_anaconda_pre" system="urn:redhat:anaconda:pre">
57 part /tmp --mountoptions=nodev
58 </fix>
59 <fix id="mount_option_tmp_fix" system="urn:xccdf:script:sh">
60 <!--should run either post-install or during firstboot-->
61 grep -e '^[^#].*/tmp.*nodev' /etc/fstab
62 if [ "$?" -ne 0 ]; then
63 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'
64 echo $new_fstab &gt; /etc/fstab
65 fi
66 </fix>
67 </Rule>
68 <Group id="xccdf_moc.elpmaxe.www_group_1" selected="false">
69 <Value id="xccdf_moc.elpmaxe.www_value_1">
70 <title>Minimal password length</title>
71 <value selector="len8">8</value>
72 <value selector="len14">14</value>
73 <value selector="len18">18</value>
74 </Value>
75 <Rule id="xccdf_moc.elpmaxe.www_rule_3">
76 <title>Set Password Minimum Length in login.defs</title>
77 <fix xmlns:xhtml="http://www.w3.org/1999/xhtml" system="urn:redhat:anaconda:pre">
78 <!--effect passwords created during installation-->
79 passwd --minlen=<sub idref="xccdf_moc.elpmaxe.www_value_1"/>
80 </fix>
81 <fix id="password_min_len_fix" system="urn:xccdf:script:python">
82 <!--should run either post-install or during firstboot-->
83 <!--python script to set
84 PASS_MIN_LEN=<sub idref="xccdf_moc.elpmaxe.www_value_1"/> in /etc/login.defs
85 and
86 minlen=<sub idref="xccdf_moc.elpmaxe.www_value_1"/> in /etc/security/pwquality.conf
87 -->
88 </fix>
89 </Rule>
90 </Group>
91 </Benchmark></ds:component></ds:data-stream-collection>