Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added AIX interim_fix, os_level tests and Solaris package, package511 and patch54 tests back to OVAL 6 #226

Open
wants to merge 1 commit into
base: oval6-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
223 changes: 223 additions & 0 deletions oval-schemas/aix-definitions-schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,119 @@
</xsd:appinfo>
</xsd:annotation>
<!-- =============================================================================== -->
<!-- ================================ INTERIM FIX TEST =========================== -->
<!-- =============================================================================== -->
<xsd:element name="interim_fix_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The interim fix test is used to check information associated with different interim or emergency fixes installed on the system. The information being tested is based off the emgr -l -u VUID command. 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 interim_fix_object and the optional state element specifies the information to check.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>interim_fix_test</oval:test>
<oval:object>interim_fix_object</oval:object>
<oval:state>interim_fix_state</oval:state>
<oval:item target_namespace="urn:oval:v6:system-characteristics:aix">interim_fix_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<oval:deprecated_info>
<oval:version>5.12</oval:version>
<oval:comment>This test has been deprecated due to lack of documented usage and will be removed in version 6.0 of the language.</oval:comment>
</oval:deprecated_info>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="aix-def_interimfixtst">
<sch:rule context="aix-def:interim_fix_test/aix-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/aix-def:interim_fix_object/@id"><sch:value-of select="../@id"/> - the object child element of a <sch:name path=".."/> must reference a interim_fix_object</sch:assert>
</sch:rule>
<sch:rule context="aix-def:interim_fix_test/aix-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/aix-def:interim_fix_state/@id"><sch:value-of select="../@id"/> - the state child element of a <sch:name path=".."/> must reference a interim_fix_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="interim_fix_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The interim_fix_object element is used by a interim_fix_test to define the specific fix 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 interim_fix_object consists of a single vuid entity that identifies the fix to be used.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="aix-def_interim_fix_object_verify_filter_state">
<sch:rule context="aix-def:interim_fix_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::aix-def:interim_fix_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='urn:oval:v6:definitions:aix') and ($state_name='interim_fix_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="vuid" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>Virtually Unique ID. A combination of time and cpuid, this ID can be used to differentiate fixes that are otherwise identical.</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="interim_fix_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The interim_fix_state element defines the different information associated with a specific interim fix installed on the system. Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="vuid" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Virtually Unique ID. A combination of time and cpuid, this ID can be used to differentiate fixes that are otherwise identical.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="label" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Each efix that is installed on a given system has a unique efix label.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="abstract" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Describes the efix package.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="state" type="aix-def:EntityStateInterimFixStateType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The the emergency fix state.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- =============================== FILESET TEST ================================ -->
<!-- =============================================================================== -->
<xsd:element name="fileset_test" substitutionGroup="oval-def:test">
Expand Down Expand Up @@ -746,6 +859,67 @@
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================== OSLEVEL TEST ================================ -->
<!-- =============================================================================== -->
<xsd:element name="oslevel_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The oslevel test reveals information about the release and maintenance level of AIX operating system. This information can be retrieved by the /usr/bin/oslevel -r command. 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 oslevel_object and the optional state element specifies the metadata to check.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="aix-def_osleveltst">
<sch:rule context="aix-def:oslevel_test/aix-def:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/aix-def:oslevel_object/@id"><sch:value-of select="../@id"/> - the object child element of a oslevel_test must reference a oslevel_object</sch:assert>
</sch:rule>
<sch:rule context="aix-def:oslevel_test/aix-def:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/aix-def:oslevel_state/@id"><sch:value-of select="../@id"/> - the state child element of a oslevel_test must reference a oslevel_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
<xsd:appinfo>
<oval:deprecated_info>
<oval:version>5.12</oval:version>
<oval:comment>This test has been deprecated due to lack of documented usage and will be removed in version 6.0 of the language.</oval:comment>
</oval:deprecated_info>
</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="oslevel_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The oslevel_object element is used by an oslevel test to define those objects to be evaluated based on a specified state. There is actually only one object relating to oslevel and this is the system as a whole. Therefore, there are no child entities defined. Any OVAL Test written to check oslevel will reference the same oslevel_object which is basically an empty object element.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="oslevel_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The oslevel_state element defines the information about maintenance level (system version). Please refer to the individual elements in the schema for more details about what each represents.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="maintenance_level" type="oval-def:EntityStateVersionType">
<xsd:annotation>
<xsd:documentation>This is the maintenance level (system version) of current AIX operating system.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- =============================================================================== -->
Expand Down Expand Up @@ -833,6 +1007,55 @@
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityStateInterimFixStateType">
<xsd:annotation>
<xsd:documentation>The EntityStateInterimFixStateType complex type defines the different values that are valid for the state entity of a interim_fix_state state. Please refer to the AIX documentation of Emergency Fix States. 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 state 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.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateStringType">
<xsd:enumeration value="STABLE">
<xsd:annotation>
<xsd:documentation>The efix was installed with a standard installation, and successfully completed the last installation operation.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="MOUNTED">
<xsd:annotation>
<xsd:documentation>The efix was installed with a mount installation operation, and successfully completed the last installation or mount operation.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="UNMOUNTED">
<xsd:annotation>
<xsd:documentation>The efix was installed with a mount installation operation and one or more efix files were unmounted in a previous emgr command operation.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="BROKEN">
<xsd:annotation>
<xsd:documentation>An unrecoverable error occurred during an installation or removal operation. The status of the efix is unreliable.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="INSTALLING">
<xsd:annotation>
<xsd:documentation>The efix is in the process of installing.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="REBOOT_REQUIRED">
<xsd:annotation>
<xsd:documentation>The efix was installed successfully and requires a reboot to fully integrate into the target system.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="REMOVING">
<xsd:annotation>
<xsd:documentation>The efix is in the process of being removed.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="">
<xsd:annotation>
<xsd:documentation>The empty string value is permitted here to allow for empty elements associated with variable references.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityObjectStanzaFileType">
<xsd:annotation>
<xsd:documentation>The lssec command lists attributes stored in the security configuration stanza files. The following security configuration files contain attributes that you can specify with the Attribute parameter.</xsd:documentation>
Expand Down
Loading