This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
x-macos-definitions-schema.xsd
executable file
·1102 lines (1102 loc) · 81.8 KB
/
x-macos-definitions-schema.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:macos-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#macos" xmlns:x-macos-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos" elementFormDefault="qualified" version="5.10.1">
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-common-5"/>
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5#macos"/>
<xsd:annotation>
<xsd:documentation>The following is a description of the elements, types, and attributes that compose extensions to the standard Apple Macintosh OVAL schema, found in Open Vulnerability and Assessment Language (OVAL). Each test is an extension of the standard test element defined in the Core Definition Schema. Through extension, each test inherits a set of elements and attributes that are shared amongst all OVAL tests. Each test is described in detail and should provide the information necessary to understand what each element and attribute represents. This document is intended for developers and assumes some familiarity with XML. A high level description of the interaction between the different tests and their relationship to the Core Definition Schema is not outlined here</xsd:documentation>
<xsd:documentation>This schema was originally developed by David Solin at jOVAL.org. The OVAL Schema is maintained by The MITRE Corporation and developed by the public OVAL Community. For more information, including how to get involved in the project and how to submit change requests, please visit the OVAL website at http://oval.mitre.org.</xsd:documentation>
<xsd:appinfo>
<schema>X-Macos Definition</schema>
<version>5.10.1</version>
<date>8/12/2014 12:08:32 PM</date>
<terms_of_use>Copyright (c) 2014, jOVAL.org. All rights reserved. The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema. When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
<sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
<sch:ns prefix="x-macos-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos"/>
<sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
</xsd:appinfo>
</xsd:annotation>
<!-- =============================================================================== -->
<!-- ================================= AUTHORIZATIONDB TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="authorizationdb_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The authorizationdb_test is used to check the properties of the plist-style XML output from the "security authorizationdb read >right-name<" command, for reading information about rights authorizations on MacOSX. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an authorizationdb_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>authorizationdb_test</oval:test>
<oval:object>authorizationdb_object</oval:object>
<oval:state>authorizationdb_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">authorizationdb_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_authorizationdbtst">
<sch:rule context="x-macos-def:authorizationdb_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:authorizationdb_object/@id"><sch:value-of select="../@id"/> - the object child element of a authorizationdb_test must reference an authorizationdb_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:authorizationdb_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:authorizationdb_state/@id"><sch:value-of select="../@id"/> - the state child element of a authorizationdb_test must reference an authorizationdb_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="authorizationdb_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The authorizationdb_object element is used by an authorizationdb_test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>An authorizationdb_object consists of a right_name entity that contains the name of the right to be read from the authorization dabatase. The resulting plist data can be queried using the xpath entity.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-macos-def_macos_object_verify_filter_state">
<sch:rule context="x-macos-def:macos_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-macos-def:authorizationdb_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos') and ($state_name='authorizationdb_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="right_name" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies the right name to be queried (read) from the authorization database.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies an Xpath expression describing the text node(s) or attribute(s) to look at. Any valid Xpath 1.0 statement is usable with one exception, at most one field may be identified in the Xpath. This is because the value_of element in the data section is only designed to work against a single field. The only valid operator for xpath is equals since there is an infinite number of possible xpaths and determinining all those that do not equal a given xpath would be impossible.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-maxos-def_xmlobjxpath">
<sch:rule context="x-macos-def:config_object/x-macos-def:xpath">
<sch:assert test="not(@operation) or @operation='equals'"><sch:value-of select="../@id"/> - operation attribute for the xpath entity of an authorizationdb_object should be 'equals', note that this overrules the general operation attribute validation (i.e. follow this one)</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="authorizationdb_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The authorizationdb_state element defines a value used to evaluate the result of a specific authorizationdb_object item.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="right_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the right_name used to create the object.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies an Xpath expression describing the text node(s) or attribute(s) to look at.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="value_of" type="oval-def:EntityStateAnySimpleType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value_of element checks the value(s) of the text node(s) or attribute(s) found.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= CORESTORAGE TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="corestorage_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The corestorage_test is used to check the properties of the plist-style XML output from the "diskutil cs list -plist" command, for reading information about the CoreStorage setup on MacOSX. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an corestorage_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>corestorage_test</oval:test>
<oval:object>corestorage_object</oval:object>
<oval:state>corestorage_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">corestorage_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_corestoragetst">
<sch:rule context="x-macos-def:corestorage_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:corestorage_object/@id"><sch:value-of select="../@id"/> - the object child element of a corestorage_test must reference an corestorage_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:corestorage_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:corestorage_state/@id"><sch:value-of select="../@id"/> - the state child element of a corestorage_test must reference an corestorage_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="corestorage_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The corestorage_object element is used by an corestorage_test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>An corestorage_object consists of a uuid entity that contains the UUID of the volume whose information should be read (i.e., 'diskutil cs info -plist [UUID]'). The resulting plist data can be queried using the xpath entity.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-macos-def_macos_object_verify_filter_state">
<sch:rule context="x-macos-def:macos_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-macos-def:corestorage_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos') and ($state_name='corestorage_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="uuid" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies the UUID of the volume about which the plist information should be retrieved.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies an Xpath expression describing the text node(s) or attribute(s) to look at. Any valid Xpath 1.0 statement is usable with one exception, at most one field may be identified in the Xpath. This is because the value_of element in the data section is only designed to work against a single field. The only valid operator for xpath is equals since there is an infinite number of possible xpaths and determinining all those that do not equal a given xpath would be impossible.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-maxos-def_xmlobjxpath">
<sch:rule context="x-macos-def:config_object/x-macos-def:xpath">
<sch:assert test="not(@operation) or @operation='equals'"><sch:value-of select="../@id"/> - operation attribute for the xpath entity of an corestorage_object should be 'equals', note that this overrules the general operation attribute validation (i.e. follow this one)</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="corestorage_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The corestorage_state element defines a value used to evaluate the result of a specific corestorage_object item.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="uuid" type="oval-def:EntityStateStringType">
<xsd:annotation>
<xsd:documentation>Specifies the UUID of the volume about which the plist information was retrieved.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies an Xpath expression describing the text node(s) or attribute(s) to look at.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="value_of" type="oval-def:EntityStateAnySimpleType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value_of element checks the value(s) of the text node(s) or attribute(s) found.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= GATEKEEPER TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="gatekeeper_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The gatekeeper_test is used to check the status of Gatekeeper and any unsigned applications that have been granted execute permission.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>gatekeeper_test</oval:test>
<oval:object>gatekeeper_object</oval:object>
<oval:state>gatekeeper_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">gatekeeper_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_gatekeepertst">
<sch:rule context="x-macos-def:gatekeeper_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:gatekeeper_object/@id"><sch:value-of select="../@id"/> - the object child element of a gatekeeper_test must reference an gatekeeper_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:gatekeeper_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:gatekeeper_state/@id"><sch:value-of select="../@id"/> - the state child element of a gatekeeper_test must reference an gatekeeper_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="gatekeeper_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The gatekeeper_object is a singleton used to access information about Gatekeeper.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="gatekeeper_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The gatekeeper_state element makes it possible to make assertions about Gatekeeper's operational status and unsigned applications that have been granted execute permission.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="enabled" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The status of Gatekeeper assessments.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="unlabeled" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The path to an unsigned application folder to which Gatekeeper has granted execute permission.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= KEYCHAIN TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="keychain_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The keychain_test is used to check the properties of the plist-style XML output from the "security show-keychain-info >keychain<" command, for reading information about keychain settings on MacOSX. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an keychain_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>keychain_test</oval:test>
<oval:object>keychain_object</oval:object>
<oval:state>keychain_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">keychain_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_keychaintst">
<sch:rule context="x-macos-def:keychain_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:keychain_object/@id"><sch:value-of select="../@id"/> - the object child element of a keychain_test must reference an keychain_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:keychain_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:keychain_state/@id"><sch:value-of select="../@id"/> - the state child element of a keychain_test must reference an keychain_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="keychain_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The keychain_object element is used by an corestorage_test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>A keychain_object consists of a keychain (name) entity that contains the name of the keychain whose settings will be queried.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-macos-def_macos_object_verify_filter_state">
<sch:rule context="x-macos-def:macos_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-macos-def:keychain_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos') and ($state_name='keychain_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="filepath" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies the filepath of the keychain to be queried. The default keychain for a user is normally located at ~/Library/Keychains/login.keychain.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="keychain_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The keychain_state element defines a value used to evaluate the result of a specific keychain_object item.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="filepath" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the filepath of the keychain used to create the object.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="lock_on_sleep" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether the keychain is configured to lock when the computer sleeps.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="timeout" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the inactivity timeout (in seconds) for the keychain, or 0 if there is no timeout.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= LAUNCHD TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="launchd_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The launchd_test is used to check the status of daemons/agents loaded via the launchd service. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a launchd_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>launchd_test</oval:test>
<oval:object>launchd_object</oval:object>
<oval:state>launchd_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">launchd_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_launchdtst">
<sch:rule context="x-macos-def:launchd_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:launchd_object/@id"><sch:value-of select="../@id"/> - the object child element of a launchd_test must reference an launchd_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:launchd_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:launchd_state/@id"><sch:value-of select="../@id"/> - the state child element of a launchd_test must reference an launchd_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="launchd_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The launchd_object element is used by a launchd_test to define the daemon/agent to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>A launchd_object consists of a label (name) entity that contains the name of the agent/daemon whose attributes will be queried.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-macos-def_macos_object_verify_filter_state">
<sch:rule context="x-macos-def:macos_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-macos-def:launchd_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos') and ($state_name='launchd_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="label" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies the deamon to be queried.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="launchd_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The launchd_state element defines a value used to evaluate the result of a specific launchd_object item.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="label" type="oval-def:EntityStateStringType" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the name of the agent/daemon used to create the object.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="pid" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the process ID of the daemon (if any).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="status" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the last exit code of the daemon (if any), or if $lt; 0, indicates the negative of the signal that interrupted processing. For example, a value of -15 would indicate that the job was terminated via a SIGTERM.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= RLIMIT TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="rlimit_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The rlimit_test is used to check system resource limits for launchd. It is a singleton object. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The state element specifies the system setup elements to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>rlimit_test</oval:test>
<oval:object>rlimit_object</oval:object>
<oval:state>rlimit_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">rlimit_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_rlimittst">
<sch:rule context="x-macos-def:rlimit_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:rlimit_object/@id"><sch:value-of select="../@id"/> - the object child element of a rlimit_test must reference an rlimit_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:rlimit_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:rlimit_state/@id"><sch:value-of select="../@id"/> - the state child element of a rlimit_test must reference an rlimit_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="rlimit_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The rlimit_object is a singleton used to access resource limit information.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="rlimit_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The rlimit_state element makes it possible to make assertions about the resource limits for launchd.</xsd:documentation>
<xsd:documentation>A resource limit is specified as a soft (current) limit and a hard (max) limit. When a soft limit is exceeded a process may receive a signal (for example, if the cpu time or file size is exceeded), but it will be allowed to con-tinue continue tinue execution until it reaches the hard limit (or modifies its resource limit).</xsd:documentation>
<xsd:documentation>For any 'unlimited' resource, the entity will have the status of 'does not exist'.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="cpu_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The maximum amount of cpu time (in seconds) to be used by each process.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="cpu_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>cpu hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="filesize_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The largest size (in bytes) file that may be created.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="filesize_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>filesize hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="data_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The maximum size (in bytes) of the data segment for a process; this defines how far a program may extend its break with the sbrk(2) system call.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="data_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>data hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="stack_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The maximum size (in bytes) of the stack segment for a process; this defines how far a program's stack segment may be extended. Stack extension is performed automatically by the system.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="stack_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>stack hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="core_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The largest size (in bytes) core file that may be created.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="core_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>core hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="rss_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The maximum size (in bytes) to which a process's resident set size may grow. This imposes a limit on the amount of physical memory to be given to a process; if memory is tight, the system will prefer to take memory from processes that are exceeding their declared resident set size.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="rss_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>rss hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="memlock_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The maximum size (in bytes) which a process may lock into memory using the mlock(2) function.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="memlock_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>memlock hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="maxproc_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The maximum number of simultaneous processes for this user id.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="maxproc_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>maxproc hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="maxfiles_current" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The maximum number of open files for this process.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="maxfiles_max" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>maxfiles hard limit.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= SOFTWAREUPDATE TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="softwareupdate_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The softwareupdate_test is used to check the status of automatic software updates on MacOSX. It is a singleton object. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The state element specifies the softwareupdate elements to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>softwareupdate_test</oval:test>
<oval:object>softwareupdate_object</oval:object>
<oval:state>softwareupdate_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">softwareupdate_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_softwareupdatetst">
<sch:rule context="x-macos-def:softwareupdate_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:softwareupdate_object/@id"><sch:value-of select="../@id"/> - the object child element of a softwareupdate_test must reference an softwareupdate_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:softwareupdate_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:softwareupdate_state/@id"><sch:value-of select="../@id"/> - the state child element of a softwareupdate_test must reference an softwareupdate_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="softwareupdate_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The softwareupdate_object is a singleton used to access automatic software update information.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="softwareupdate_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The softwareupdate_state element makes it possible to make assertions about the state of automatic software updates.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="schedule" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether automatic checking is enabled (true).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="software_title" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the title string for an available (not installed) software update.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= SYSTEMPROFILER TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="systemprofiler_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The systemprofiler_test is used to check the properties of the plist-style XML output from the "system_profiler -xml <data type>" command, for reading information about system inventory data on MacOSX. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references an systemprofiler_object and the optional state element specifies the data to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>systemprofiler_test</oval:test>
<oval:object>systemprofiler_object</oval:object>
<oval:state>systemprofiler_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">systemprofiler_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_systemprofilertst">
<sch:rule context="x-macos-def:systemprofiler_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:systemprofiler_object/@id"><sch:value-of select="../@id"/> - the object child element of a systemprofiler_test must reference an systemprofiler_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:systemprofiler_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:systemprofiler_state/@id"><sch:value-of select="../@id"/> - the state child element of a systemprofiler_test must reference an systemprofiler_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="systemprofiler_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The systemprofiler_object element is used by an systemprofiler_test to define the object to be evaluated. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:documentation>An systemprofiler_object consists of a data_type entity that contains the name of the datatype that was probed by the system_profiler utility. The resulting plist data can be queried using the xpath entity.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-macos-def_macos_object_verify_filter_state">
<sch:rule context="x-macos-def:macos_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-macos-def:systemprofiler_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#x-macos') and ($state_name='systemprofiler_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="data_type" type="x-macos-def:EntityObjectDataTypeType">
<xsd:annotation>
<xsd:documentation>The data_type entity provides the datatype value that is desired.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Specifies an Xpath expression describing the text node(s) or attribute(s) to look at. Any valid Xpath 1.0 statement is usable with one exception, at most one field may be identified in the Xpath. This is because the value_of element in the data section is only designed to work against a single field. The only valid operator for xpath is equals since there is an infinite number of possible xpaths and determinining all those that do not equal a given xpath would be impossible.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-maxos-def_xmlobjxpath">
<sch:rule context="x-macos-def:config_object/x-macos-def:xpath">
<sch:assert test="not(@operation) or @operation='equals'"><sch:value-of select="../@id"/> - operation attribute for the xpath entity of an systemprofiler_object should be 'equals', note that this overrules the general operation attribute validation (i.e. follow this one)</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="systemprofiler_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The systemprofiler_state element defines a value used to evaluate the result of a specific systemprofiler_object item.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="data_type" type="x-macos-def:EntityStateDataTypeType">
<xsd:annotation>
<xsd:documentation>The data_type entity provides the datatype value that is desired.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies an Xpath expression describing the text node(s) or attribute(s) to look at.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="value_of" type="oval-def:EntityStateAnySimpleType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value_of element checks the value(s) of the text node(s) or attribute(s) found.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ================================= SYSTEMSETUP TEST ================================= -->
<!-- =============================================================================== -->
<xsd:element name="systemsetup_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The systemsetup_test is used to check systemsetup properties. It is a singleton object. It extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The state element specifies the system setup elements to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>systemsetup_test</oval:test>
<oval:object>systemsetup_object</oval:object>
<oval:state>systemsetup_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-macos">systemsetup_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-macos-def_systemsetuptst">
<sch:rule context="x-macos-def:systemsetup_test/x-macos-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-macos-def:systemsetup_object/@id"><sch:value-of select="../@id"/> - the object child element of a systemsetup_test must reference an systemsetup_object</sch:assert>
</sch:rule>
<sch:rule context="x-macos-def:systemsetup_test/x-macos-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-macos-def:systemsetup_state/@id"><sch:value-of select="../@id"/> - the state child element of a systemsetup_test must reference an systemsetup_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType"/>
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="systemsetup_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The systemsetup_object is a singleton used to access system setup information.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="systemsetup_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The systemsetup_state element makes it possible to make assertions about system setup settings.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="timezone" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the name of the time zone.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="usingnetworktime" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies weather the machine is using network time.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="networktimeserver" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the network time server.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="computersleep" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the computer sleep inactivity timer, or 0 for never.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="displaysleep" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the display sleep inactivity timer, or 0 for never.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="harddisksleep" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the hard disk sleep inactivity timer, or 0 for never.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="wakeonmodem" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether the computer will wake up if the modem is accessed.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="wakeonnetworkaccess" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether the computer will wake up if the network is accessed.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="restartfreeze" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether the computer will restart after freezing.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="allowpowerbuttontosleepcomputer" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether the power button can be used to cause the computer to sleep.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="remotelogin" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether remote logins are allowed.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="remoteappleevents" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether remote Apple events are enabled.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="computername" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the computer's name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="startupdisk" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the startup disk.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="waitforstartupafterpowerfailure" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the number of seconds the computer waits to start up after a power failure.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="disablekeyboardwhenenclosurelockisengaged" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether the keyboard is locked when the closure lock is engaged.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="kernelbootarchitecturesetting" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the kernel boot architecture setting.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="EntityObjectDataTypeType">
<xsd:annotation>
<xsd:documentation>The EntityObjectDataTypeType complex type defines the different values that are valid for the data_type entity of a system_profiler object. These values describe the system_profiler XML data to be retrieved. The empty string is also allowed as a valid value to support an empty element that is found when a variable reference is used within the index entity. Note that when using pattern matches and variables care must be taken to ensure that the regular expression and variable values align with the enumerated values. Please note that the values identified are for the data_type entity and are not valid values for the datatype attribute.</xsd:documentation>