Debian Codegraph @

tests/probes/systemdunitproperty/test_probes_systemdunitproperty_offline_mode.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2 <oval_definitions xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:lin-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" 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
4 <generator>
5 <oval:product_name>systemdunitproperty</oval:product_name>
6 <oval:product_version>1.0</oval:product_version>
7 <oval:schema_version>5.11</oval:schema_version>
8 <oval:timestamp>2014-06-18T00:00:00-00:00</oval:timestamp>
9 </generator>
10
11 <definitions>
12
13 <definition class="compliance" version="1" id="oval:0:def:1"> <!-- comment="true" -->
14 <metadata><title></title><description></description></metadata>
15 <notes><note>asdasd</note></notes>
16 <criteria>
17 <criterion test_ref="oval:0:tst:1"/>
18 </criteria>
19 </definition>
20
21 <definition class="compliance" version="1" id="oval:0:def:2"> <!-- comment="true" -->
22 <metadata><title></title><description></description></metadata>
23 <notes><oval:note>asdasd</oval:note></notes>
24 <criteria>
25 <criterion test_ref="oval:0:tst:2"/>
26 </criteria>
27 </definition>
28
29 <definition class="compliance" version="1" id="oval:0:def:3"> <!-- comment="true" -->
30 <metadata><title></title><description></description></metadata>
31 <criteria>
32 <criterion test_ref="oval:0:tst:3"/>
33 </criteria>
34 </definition>
35
36 <definition class="compliance" version="1" id="oval:0:def:4"> <!-- comment="true" -->
37 <metadata><title></title><description></description></metadata>
38 <criteria>
39 <criterion test_ref="oval:0:tst:4"/>
40 </criteria>
41 </definition>
42
43 <definition class="compliance" version="1" id="oval:0:def:5"> <!-- comment="true" -->
44 <metadata><title></title><description></description></metadata>
45 <criteria>
46 <criterion test_ref="oval:0:tst:5"/>
47 </criteria>
48 </definition>
49
50 <definition class="compliance" version="1" id="oval:0:def:6"> <!-- comment="false" -->
51 <metadata><title></title><description></description></metadata>
52 <criteria>
53 <criterion test_ref="oval:0:tst:6"/>
54 </criteria>
55 </definition>
56
57 <definition class="compliance" version="1" id="oval:0:def:7"> <!-- comment="false" -->
58 <metadata><title></title><description></description></metadata>
59 <criteria>
60 <criterion test_ref="oval:0:tst:7"/>
61 </criteria>
62 </definition>
63
64 </definitions>
65
66 <tests>
67
68 <systemdunitproperty_test check_existence="only_one_exists" version="1" id="oval:0:tst:1" check="all" comment="true" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
69 <object object_ref="oval:0:obj:1"/>
70 </systemdunitproperty_test>
71
72 <!-- test if there's at least one service unit having LoadState equal to 'loaded' or 'not-found' -->
73 <systemdunitproperty_test id="oval:0:tst:2" check="at least one" check_existence="all_exist" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="true" version="1">
74 <object object_ref="oval:0:obj:2"/>
75 <state state_ref="oval:0:ste:1"/>
76 </systemdunitproperty_test>
77
78 <!-- test if there's at least one service unit having LoadState equal to 'loaded' excluding those with LoadState 'not-found' -->
79 <systemdunitproperty_test id="oval:0:tst:3" check="at least one" check_existence="all_exist" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="true" version="1">
80 <object object_ref="oval:0:obj:3"/>
81 <state state_ref="oval:0:ste:1"/>
82 </systemdunitproperty_test>
83
84 <!-- test if there's at least one service conflicting the shutdown.target -->
85 <systemdunitproperty_test id="oval:0:tst:4" check="at least one" check_existence="all_exist" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="true" version="1">
86 <object object_ref="oval:0:obj:4"/>
87 <state state_ref="oval:0:ste:3"/>
88 </systemdunitproperty_test>
89
90 <!-- check that there doesn't exist systemd-journald.service unit with valid OscapTestingProperty property -->
91 <systemdunitproperty_test id="oval:0:tst:5" check="all" check_existence="none_exist" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="true" version="1">
92 <object object_ref="oval:0:obj:5"/>
93 </systemdunitproperty_test>
94
95 <!-- check if there is at least one systemd-journald.service unit it has value of OscapTestingProperty property equal to empty string -->
96 <systemdunitproperty_test id="oval:0:tst:6" check="all" check_existence="at_least_one_exists" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="false" version="1">
97 <object object_ref="oval:0:obj:5"/>
98 <state state_ref="oval:0:ste:4"/>
99 </systemdunitproperty_test>
100
101 <!-- check if abcdefghijklmnopqrstuvwxyz.target unit has value of UnitFileState property (case-insensitively) equal to 'enabled' -->
102 <!-- made up unit name, should fail -->
103 <systemdunitproperty_test id="oval:0:tst:7" check="all" check_existence="at_least_one_exists" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="false" version="1">
104 <object object_ref="oval:0:obj:6"/>
105 <state state_ref="oval:0:ste:5"/>
106 </systemdunitproperty_test>
107
108 </tests>
109
110 <objects>
111
112 <systemdunitproperty_object version="1" id="oval:0:obj:1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
113 <unit>-.mount</unit>
114 <property>LoadState</property>
115 </systemdunitproperty_object>
116
117 <systemdunitproperty_object id="oval:0:obj:2" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
118 <unit operation="pattern match">.*\.service</unit>
119 <property>LoadState</property>
120 </systemdunitproperty_object>
121
122 <systemdunitproperty_object id="oval:0:obj:3" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
123 <unit operation="pattern match">.*\.service</unit>
124 <property>LoadState</property>
125 <filter action="exclude" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5">oval:0:ste:2</filter>
126 </systemdunitproperty_object>
127
128 <systemdunitproperty_object id="oval:0:obj:4" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
129 <unit operation="pattern match">.*\.service</unit>
130 <property>Conflicts</property>
131 </systemdunitproperty_object>
132
133 <systemdunitproperty_object id="oval:0:obj:5" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
134 <unit>systemd-journald.service</unit>
135 <property>OscapTestingProperty</property>
136 </systemdunitproperty_object>
137
138 <systemdunitproperty_object id="oval:0:obj:6" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
139 <unit>abcdefghijklmnopqrstuvwxyz.target</unit>
140 <property>UnitFileState</property>
141 </systemdunitproperty_object>
142
143 </objects>
144
145 <states>
146
147 <systemdunitproperty_state id="oval:0:ste:1" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
148 <value operation="pattern match">(loaded|not-found)</value>
149 </systemdunitproperty_state>
150
151 <systemdunitproperty_state id="oval:0:ste:2" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
152 <value operation="equals">not-found</value>
153 </systemdunitproperty_state>
154
155 <systemdunitproperty_state id="oval:0:ste:3" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
156 <value operation="pattern match">(?i)shutdown.target(?-i)</value>
157 </systemdunitproperty_state>
158
159 <systemdunitproperty_state id="oval:0:ste:4" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
160 <value operation="pattern match">^$</value>
161 </systemdunitproperty_state>
162
163 <systemdunitproperty_state id="oval:0:ste:5" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
164 <value operation="equals">(?i)enabled(?-i)</value>
165 </systemdunitproperty_state>
166
167 </states>
168
169 </oval_definitions>