Definition Type: Element
Name: file_test
Namespace: http://oval.mitre.org/XMLSchema/oval#unix
Type: oval:standardTestType
Containing Schema: unix-schema.xsd
Abstract
Documentation:
This test's purpose is to check a file's metadata, of the sort returned by either an ls command, stat command or stat() system call. The object being tested here is specified by an absolute path to a file. Remember that the default operator is EXISTS, so if no operator attribute is present for the path element and file specified is not found, then the test should fail.
Collapse XSD Schema Diagram:
Drilldown into data in schema unix-schema_xsd Drilldown into object in schema unix-schema_xsd Drilldown into notes in schema oval-schema_xsd Drilldown into comment in schema oval-schema_xsd Drilldown into id in schema oval-schema_xsd Drilldown into testType in schema oval-schema_xsd Drilldown into check in schema oval-schema_xsd Drilldown into standardTestType in schema oval-schema_xsdXSD Diagram of file_test in schema unix-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="file_test" substitutionGroup="oval:test">
    <xsd:annotation>
        <xsd:documentation>This test's purpose is to check a file's metadata, of the sort returned by either an ls command, stat command or stat() system call.  The object being tested here is specified by an absolute path to a file.  Remember that the default operator is EXISTS, so if no operator attribute is present for the path element and file specified is not found, then the test should fail.</xsd:documentation>
        <xsd:appinfo>
            <test_name>File Test</test_name>
            <extends>standardTestType</extends>
            <valid_sections>notes, object, data</valid_sections>
            <example>
            </example>
        </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="oval:standardTestType">
                <xsd:sequence>
                    <xsd:element name="object">
                        <xsd:complexType>
                            <xsd:complexContent>
                                <xsd:extension base="oval:objectType">
                                    <xsd:sequence>
                                        <xsd:element name="path" type="unix: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>File 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:sequence>
                                </xsd:extension>
                            </xsd:complexContent>
                        </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="data" minOccurs="0">
                        <xsd:complexType>
                            <xsd:complexContent>
                                <xsd:extension base="oval:dataType">
                                    <xsd:sequence>
                                        <xsd:element name="type" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the file's type: regular file (regular), directory, named pipe (fifo), symbolic link, socket or block special.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File 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:element name="user" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the owner of the file.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File 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:element name="group" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the group of the file.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File 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:element name="group_id" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the group owner of the file, by group number.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File 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:element name="user_id" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>The numeric user id, or uid, is the third column of each user's entry in
                                                        /etc/passwd. This element represents the owner of the file.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File 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:element name="a_time" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the time of the last access, in seconds since the last epoch.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File Test</parent_test>
                                                    <cardinality>0-1</cardinality>
                                                    <content>string</content>
                                                    <valid_datatypes>string</valid_datatypes>
                                                    <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal, pattern match</valid_operators>
                                                </xsd:appinfo>
                                            </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element name="c_time" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the time of the last change to the file's inode, which stores all.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File Test</parent_test>
                                                    <cardinality>0-1</cardinality>
                                                    <content>string</content>
                                                    <valid_datatypes>string</valid_datatypes>
                                                    <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal, pattern match</valid_operators>
                                                </xsd:appinfo>
                                            </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element name="m_time" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the time of the last change to the file's contents.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File Test</parent_test>
                                                    <cardinality>0-1</cardinality>
                                                    <content>string</content>
                                                    <valid_datatypes>string</valid_datatypes>
                                                    <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal, pattern match</valid_operators>
                                                </xsd:appinfo>
                                            </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element name="md5" type="oval:subtestStringType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the MD5 hash of the file's contents, which serves as a kind of content integrity check.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File 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:element name="size" type="oval:subtestIntType" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>This is the size of the file in bytes.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>File Test</parent_test>
                                                    <cardinality>0-1</cardinality>
                                                    <content>integer</content>
                                                    <valid_datatypes>integer</valid_datatypes>
                                                    <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal</valid_operators>
                                                </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>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
notes oval:notes 0 1
object unix:object (1) (1)
data unix:data 0 (1)
Collapse Child Attributes:
Name Type Default Value Use
id oval:id Required
comment oval:comment Required
check oval:check all Optional
Collapse Derivation Tree:
Collapse References:
oval:test