<xsd:schema targetNamespace="http://oval.mitre.org/XMLSchema/oval_results#independent" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval_results="http://oval.mitre.org/XMLSchema/oval_results" xmlns:independent="http://oval.mitre.org/XMLSchema/oval_results#independent" elementFormDefault="qualified" version="4.2">
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval_results" schemaLocation="oval-results-schema.xsd"/>
<xsd:annotation>
<xsd:documentation>This document outlines the tests of the OVAL Results XML schema that are independent of any specific family or platform.</xsd:documentation>
<xsd:documentation>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>Independent Results</schema>
<version>4.2</version>
<date>2 December 2005</date>
</xsd:appinfo>
</xsd:annotation>
<!-- =============================================================================== -->
<!-- ============================ COMPOUND TEST (cmp) ============================ -->
<!-- =============================================================================== -->
<xsd:element name="compound_test" substitutionGroup="oval_results:test">
<xsd:annotation>
<xsd:documentation>This test has been deprecated in version 4.1 of the oval-schema and will be removed completely in version 5. It is recommended that all future OVAL Content use the compound_test found in the independent schema.</xsd:documentation>
<xsd:documentation>A compound test allows multiple tests (including other compound tests) to be joined together by a logical operator. This provides flexibility in test creation and enables complex tests to be reused, serving as building blocks for future tests. The required operation attribute specifies how to logically combine the numerous subtests of a compound test. Possible values are: AND, OR, XOR. A value of AND means that each subtest must be true for the compound_test to return true. A value of OR means that only one subtest must be true for the compound_test to return true. A value of XOR means that one, and only one, subtest must be true for the compound_test to return true. The required result attribute specifies the result of the OVAL analysis on this group of subtests. A compound test extends the compoundTestType.</xsd:documentation>
<xsd:appinfo>
<test_name>Compound Test</test_name>
<extends>compoundTestType</extends>
<valid_sections>[message], subtest</valid_sections>
<example>
<compound_test id="cmp-0" operation="AND" comment="an example compound test" version="1" result="1">
<subtest test_ref="wrt-0" version="1" result="0"/>
<subtest test_ref="wat-0" version="1" negate="true" result="1"/>
<subtest test_ref="cmp-1" version="1" result="1"/>
</compound_test>
</example>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:testType">
<xsd:sequence>
<xsd:element name="subtest" minOccurs="1" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The subtest element specifies a particular test to be referenced. The required test_ref attribute accomplishes this by linking to a valid test id. The optional 'negate' attribute signifies that the result of an individual test should be negated during analysis. For example, consider a test that returns TRUE if a specific patch is installed. By negating this test, it now analyzes to TRUE if the patch is NOT installed. The required result attribute holds the result of the analysis, either true, false, or error.</xsd:documentation>
<xsd:appinfo>
<parent_test>Compound Test</parent_test>
<cardinality>1-n</cardinality>
<content>none</content>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="test_ref" type="oval_results:testid" use="required"/>
<xsd:attribute name="version" type="oval_results:versionType" default="1"/>
<xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false"/>
<xsd:attribute name="result" type="oval_results:resultType" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="operation" type="oval_results:operations" use="required"/>
<xsd:attribute name="result" type="oval_results:resultType" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ======================= TEXT FILE CONTENT TEST (tft) ======================== -->
<!-- =============================================================================== -->
<xsd:element name="textfilecontent_test" substitutionGroup="oval_results:test">
<xsd:annotation>
<xsd:documentation>This test checks the contents of a text file.</xsd:documentation>
<xsd:appinfo>
<test_name>Text File Content Test</test_name>
<extends>standardTestType</extends>
<valid_sections>message, definition_object, definition_data, tested_object</valid_sections>
<example></example>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:standardTestType">
<xsd:sequence>
<xsd:element name="definition_object" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:definitionObjectType">
<xsd:sequence>
<xsd:element name="path" type="independent:componentType" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the absolute path to a file on the machine. This path can be created from multiple components that are added together. When a pattern match operator is used, the corresponding regular expression is matched against the set of absolute path strings. These string would not include the '.' and '..' notations. This means that a '.*' component of a regular expression will not only match all files in the specified directories, but all subdirectories, their subdirectories, etc.</xsd:documentation>
<xsd:appinfo>
<parent_test>Text File Content Test</parent_test>
<cardinality>1</cardinality>
<content>none</content>
<valid_datatypes>component</valid_datatypes>
<valid_operators>equals, not equal, pattern match</valid_operators>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="line" type="oval_results:subtestStringType" minOccurs="1" maxOccurs="1" nillable="true">
<xsd:annotation>
<xsd:documentation>The line element represents a line in the file and is represented using a regular expression.</xsd:documentation>
<xsd:appinfo>
<parent_test>Text File Content Test</parent_test>
<cardinality>1</cardinality>
<content>string</content>
<valid_datatypes>string</valid_datatypes>
<valid_operators>pattern match</valid_operators>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="definition_data" minOccurs="0" maxOccurs="1">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:definitionDataType">
<xsd:sequence>
<xsd:element name="subexpression" type="oval_results:subtestStringType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>Each subexpression in the regular expression of the line element is then tested against the value specified in the subexpression element.</xsd:documentation>
<xsd:appinfo>
<parent_test>Text File Content Test</parent_test>
<cardinality>0-n</cardinality>
<content>string</content>
<valid_datatypes>string</valid_datatypes>
<valid_operators>equals, not equal, pattern match</valid_operators>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="tested_object" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:testedObjectType">
<xsd:sequence>
<xsd:element name="path" type="oval_results:testedStringType" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The absolute path string of a matching text file object.</xsd:documentation>
<xsd:appinfo>
<parent_test>Text File Content Test</parent_test>
<cardinality>1</cardinality>
<content>string</content>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="line" type="oval_results:testedStringType" minOccurs="1" maxOccurs="1" nillable="true">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>
<parent_test>Text File Content Test</parent_test>
<cardinality>1</cardinality>
<content>string</content>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ============================ UNKNOWN TEST (ukn) ============================= -->
<!-- =============================================================================== -->
<xsd:element name="unknown_test" substitutionGroup="oval_results:test">
<xsd:annotation>
<xsd:documentation>This test has been deprecated in version 4.1 of the oval-schema and will be removed completely in version 5. It is recommended that all future OVAL Content use the unknown_test found in the independent schema.</xsd:documentation>
<xsd:documentation>An unknown test acts as a placeholder for tests whose implementation is unknown. Any information that is known about the test should be held in the notes child element that is available through the extension of the abstract test element. An unknown test extends the testType. The required result attribute holds the result of the analysis, either true, false, or error.</xsd:documentation>
<xsd:appinfo>
<test_name>Unknown Test</test_name>
<extends>TestType</extends>
<valid_sections>[message]</valid_sections>
<example>
<unknown_test id="ukn-0" comment="an example unknown test" version="1" result="0">
</unknown_test>
</example>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:testType">
<xsd:attribute name="result" type="oval_results:resultType" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ============================ VARIABLE TEST (vct) ============================ -->
<!-- =============================================================================== -->
<xsd:element name="variable_test" substitutionGroup="oval_results:test">
<xsd:annotation>
<xsd:documentation>This test has been deprecated in version 4.1 of the oval-schema and will be removed completely in version 5. It is recommended that all future OVAL Content use the variable_test found in the independent schema.</xsd:documentation>
<xsd:documentation>A variable test allows the value of a variable to be compared to a defined value. An example use would be to validate that a variable being passed in from an external source falls within a specified range.</xsd:documentation>
<xsd:appinfo>
<test_name>Variable Test</test_name>
<extends>TestType</extends>
<valid_sections>[message], item</valid_sections>
<example>
<variable_test id="vct-0" operation="AND" comment="an example variable test" version="1" result="1">
<item variable="var-3" version="1" datatype="int" operator="greater than" result="0">6</item>
<item variable="var-3" version="1" datatype="int" operator="less than" result="1">78</item>
</variable_test>
</example>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:testType">
<xsd:sequence>
<xsd:element name="item" minOccurs="1" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>An 'item' element defines a specific comparison to perform on a variable. The required 'variable' attribute provides a link to a variable to use. The optional datatype determines the type of data expected as the value of the 'item' element. (the default datatype is 'string') The required 'operator' attribute defines the operator to use for the comparision. The optional var_ref attribute refers the value of the item to a variable element. Note that the comparision should read: '*variable* is *operator* the value of the item'. Also note that it is implied that the datatypes of the two value being compared are the same.</xsd:documentation>
<xsd:appinfo>
<parent_test>Variable Test</parent_test>
<cardinality>1</cardinality>
<content>none</content>
<valid_datatypes>binary, boolean, component, float, int, string, version</valid_datatypes>
<valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal, bitwise and, bitwise or, pattern match</valid_operators>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="xsd:anyType">
<xsd:attribute name="variable" type="oval_results:varid" use="required"/>
<xsd:attribute name="variable_version" type="oval_results:versionType" use="optional" default="1"/>
<xsd:attribute name="datatype" type="oval_results:datatypes" use="optional" default="string"/>
<xsd:attribute name="operator" type="oval_results:operators" use="optional" default="equals"/>
<xsd:attribute name="var_ref" type="oval_results:varid" use="optional"/>
<xsd:attribute name="version" type="oval_results:versionType" use="optional" default="1"/>
<xsd:attribute name="result" type="oval_results:resultType" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="operation" type="oval_results:operations" use="required"/>
<xsd:attribute name="result" type="oval_results:resultType" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ======================= XML FILE CONTENT TEST (xft) ========================= -->
<!-- =============================================================================== -->
<xsd:element name="xmlfilecontent_test" substitutionGroup="oval_results:test">
<xsd:annotation>
<xsd:documentation>This test checks the contents of an xml file.</xsd:documentation>
<xsd:appinfo>
<test_name>XML File Content Test</test_name>
<extends>standardTestType</extends>
<valid_sections>message, definition_object, definition_data, tested_object</valid_sections>
<example></example>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:standardTestType">
<xsd:sequence>
<xsd:element name="definition_object" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:definitionObjectType">
<xsd:sequence>
<xsd:element name="path" type="independent:componentType" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the absolute path to a file on the machine. This path can be created from multiple components that are added together.</xsd:documentation>
<xsd:appinfo>
<parent_test>XML File Content Test</parent_test>
<cardinality>1</cardinality>
<content>none</content>
<valid_datatypes>component</valid_datatypes>
<valid_operators>equals, not equal, pattern match</valid_operators>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval_results:subtestStringType" minOccurs="1" maxOccurs="1" nillable="true">
<xsd:annotation>
<xsd:documentation>Specifies an Xpath expression describing the nodes to look at.</xsd:documentation>
<xsd:appinfo>
<parent_test>XML File Content Test</parent_test>
<cardinality>1</cardinality>
<content>string</content>
<valid_datatypes>string</valid_datatypes>
<valid_operators>equals, not equal, pattern match</valid_operators>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="definition_data" minOccurs="0" maxOccurs="1">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:definitionDataType">
<xsd:sequence>
<xsd:element name="value_of" type="oval_results:subtestStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The value element checks the value of the nodes found. How this is used is entirely controlled by operator attributes.</xsd:documentation>
<xsd:appinfo>
<parent_test>XML File Content Test</parent_test>
<cardinality>0-1</cardinality>
<content>string</content>
<valid_datatypes>string</valid_datatypes>
<valid_operators>equals, not equal, pattern match</valid_operators>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="tested_object" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval_results:testedObjectType">
<xsd:sequence>
<xsd:element name="path" type="oval_results:testedStringType" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The absolute path string of a matching XML file object.</xsd:documentation>
<xsd:appinfo>
<parent_test>XML File Content Test</parent_test>
<cardinality>1</cardinality>
<content>string</content>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="xpath" type="oval_results:testedStringType" minOccurs="1" maxOccurs="1" nillable="true">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>
<parent_test>XML File Content Test</parent_test>
<cardinality>1</cardinality>
<content>string</content>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- =============================================================================== -->
<!-- =============================================================================== -->
<xsd:complexType name="componentType">
<xsd:annotation>
<xsd:documentation>The componentType allows a value to be obtained by combining pieces from different sources. Each string defined by the different component elements is concatenated together to form the final string used. Each child component element has an attribute called type. The value of this attribute determines where to get the string used to build the file path. A type of literal means to use the value of the child component element as is, and to just concatenated it to the other strings. If a pattern match operator has been specified with a componentType, then the final string should be thought of as the pattern to test. As of Version 4 of the OVAL schema, pattern match can not be specified for the idividual components.</xsd:documentation>
<xsd:appinfo>
<extends>oval_results:subtestBaseType</extends>
<attributes>(includes oval_results:subtestAttributes)</attributes>
<content>none</content>
<child_elements>component</child_elements>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="oval_results:subtestBaseType">
<xsd:sequence>
<xsd:element name="component" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="environment_variable"/>
<xsd:enumeration value="group_homedirs"/>
<xsd:enumeration value="literal"/>
<xsd:enumeration value="registry_value"/>
<xsd:enumeration value="user_homedirs"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
|