<?xml version='1.0' encoding='utf-8'?>
<oval-def:oval_definitions xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:linux="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
  <oval-def:generator>
    <oval:product_name>OVALFileLinker from SCAP Security Guide</oval:product_name>
    <oval:product_version>ssg: [0, 1, 80], python: 3.10.12</oval:product_version>
    <oval:schema_version>5.11.2</oval:schema_version>
    <oval:timestamp>2025-12-02T22:12:11</oval:timestamp>
  </oval-def:generator>
  <oval-def:definitions>
    <oval-def:definition id="oval:ssg-aide_periodic_cron_checking:def:1" version="3" class="compliance">
      <oval-def:metadata>
        <oval-def:title>Configure Periodic Execution of AIDE</oval-def:title>
        <oval-def:affected family="unix">
          <oval-def:platform>Ubuntu 22.04</oval-def:platform>
        </oval-def:affected>
        <oval-def:reference ref_id="aide_periodic_cron_checking" source="ssg" />
        <oval-def:description>By default, AIDE does not install itself for periodic
      execution. Periodically running AIDE is necessary to reveal
      unexpected changes in installed files.
      </oval-def:description>
      </oval-def:metadata>
      <oval-def:criteria operator="AND">
        <oval-def:extend_definition comment="Aide is installed" definition_ref="oval:ssg-package_aide_installed:def:1" />
        <oval-def:criteria operator="OR">
          <oval-def:criterion comment="aide check scheduled in crontab for root" test_ref="oval:ssg-tst_aide_check_in_crontab_root:tst:1" />
          <oval-def:criterion comment="aide check scheduled in /etc/cron.*" test_ref="oval:ssg-tst_aide_check_in_etc_cron:tst:1" />
          <oval-def:criterion comment="aide check scheduled in /etc/crontab" test_ref="oval:ssg-tst_aide_check_in_etc_crontab:tst:1" />
          <oval-def:criteria operator="AND">
            <oval-def:criterion comment="systemd aidecheck.service enabled" test_ref="oval:ssg-tst_aidecheck-service_enabled:tst:1" />
            <oval-def:criterion comment="systemd aidecheck.timer enabled" test_ref="oval:ssg-tst_aidecheck-timer_enabled:tst:1" />
            <oval-def:criterion comment="systemd aidecheck.timer active" test_ref="oval:ssg-tst_aidecheck-timer_active:tst:1" />
          </oval-def:criteria>
        </oval-def:criteria>
      </oval-def:criteria>
    </oval-def:definition>
    <oval-def:definition id="oval:ssg-package_aide_installed:def:1" version="1" class="compliance">
      <oval-def:metadata>
        <oval-def:title>Install AIDE</oval-def:title>
        <oval-def:affected family="unix">
          <oval-def:platform>Ubuntu 22.04</oval-def:platform>
        </oval-def:affected>
        <oval-def:reference ref_id="package_aide_installed" source="ssg" />
        <oval-def:description>The DPKG package aide should be installed.</oval-def:description>
      </oval-def:metadata>
      <oval-def:criteria operator="AND">
        <oval-def:criterion comment="package aide is installed" test_ref="oval:ssg-test_package_aide_installed:tst:1" />
      </oval-def:criteria>
    </oval-def:definition>
  </oval-def:definitions>
  <oval-def:tests>
    <ind:textfilecontent54_test id="oval:ssg-tst_aide_check_in_crontab_root:tst:1" version="1" check="all" comment="aide check scheduled in crontab for root" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_root_crontab_aide:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-tst_aide_check_in_etc_cron:tst:1" version="1" check="all" comment="aide check scheduled in /etc/cron.*" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_etc_cron_aide:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-tst_aide_check_in_etc_crontab:tst:1" version="1" check="all" comment="aide check scheduled in /etc/crontab" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_etc_crontab_aide:obj:1" />
    </ind:textfilecontent54_test>
    <linux:systemdunitproperty_test id="oval:ssg-tst_aidecheck-service_enabled:tst:1" version="1" check="all" comment="systemd aidecheck.service enabled" state_operator="AND">
      <linux:object object_ref="oval:ssg-obj_aidecheck-service_unitfilestate:obj:1" />
      <linux:state state_ref="oval:ssg-ste_aide_is_enabled:ste:1" />
    </linux:systemdunitproperty_test>
    <linux:systemdunitproperty_test id="oval:ssg-tst_aidecheck-timer_enabled:tst:1" version="1" check="all" comment="systemd aidecheck.timer enabled" state_operator="AND">
      <linux:object object_ref="oval:ssg-obj_aidecheck-timer_unitfilestate:obj:1" />
      <linux:state state_ref="oval:ssg-ste_aide_is_enabled:ste:1" />
    </linux:systemdunitproperty_test>
    <linux:systemdunitproperty_test id="oval:ssg-tst_aidecheck-timer_active:tst:1" version="1" check="all" comment="systemd aidecheck.timer active" state_operator="AND">
      <linux:object object_ref="oval:ssg-obj_aidecheck-timer_activestate:obj:1" />
      <linux:state state_ref="oval:ssg-ste_aide_is_active:ste:1" />
    </linux:systemdunitproperty_test>
    <linux:dpkginfo_test id="oval:ssg-test_package_aide_installed:tst:1" version="1" check="all" comment="package aide is installed" check_existence="all_exist" state_operator="AND">
      <linux:object object_ref="oval:ssg-obj_test_package_aide_installed:obj:1" />
    </linux:dpkginfo_test>
  </oval-def:tests>
  <oval-def:objects>
    <ind:textfilecontent54_object id="oval:ssg-obj_root_crontab_aide:obj:1" version="1">
      <ind:filepath datatype="string">/var/spool/cron/crontabs/root</ind:filepath>
      <ind:pattern operation="pattern match" datatype="string">aide(\.wrapper)?</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-obj_etc_cron_aide:obj:1" version="1">
      <ind:path operation="pattern match">/etc/cron\.(daily|hourly|weekly)</ind:path>
      <ind:filename operation="pattern match">^.*$</ind:filename>
      <ind:pattern operation="pattern match" datatype="string">^(?:\/usr\/bin\/)?aide(\.wrapper)?</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-obj_etc_crontab_aide:obj:1" version="1">
      <ind:filepath datatype="string">/etc/crontab</ind:filepath>
      <ind:pattern operation="pattern match" datatype="string">[^\s]+\s+[^\s]+\s+\*(?:\/[1-7])*\s+\*\s+[^\s]+\s+(?:\/usr\/bin\/)?aide(\.wrapper)?\s+[^\s]+\s+(?=-C|--check).*</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <linux:systemdunitproperty_object id="oval:ssg-obj_aidecheck-service_unitfilestate:obj:1" version="1">
      <linux:unit>aidecheck.service</linux:unit>
      <linux:property>UnitFileState</linux:property>
    </linux:systemdunitproperty_object>
    <linux:systemdunitproperty_object id="oval:ssg-obj_aidecheck-timer_unitfilestate:obj:1" version="1">
      <linux:unit>aidecheck.timer</linux:unit>
      <linux:property>UnitFileState</linux:property>
    </linux:systemdunitproperty_object>
    <linux:systemdunitproperty_object id="oval:ssg-obj_aidecheck-timer_activestate:obj:1" version="1">
      <linux:unit>aidecheck.timer</linux:unit>
      <linux:property>ActiveState</linux:property>
    </linux:systemdunitproperty_object>
    <linux:dpkginfo_object id="oval:ssg-obj_test_package_aide_installed:obj:1" version="1">
      <linux:name>aide</linux:name>
    </linux:dpkginfo_object>
  </oval-def:objects>
  <oval-def:states>
    <linux:systemdunitproperty_state id="oval:ssg-ste_aide_is_enabled:ste:1" version="1" operator="AND">
      <linux:value>enabled</linux:value>
    </linux:systemdunitproperty_state>
    <linux:systemdunitproperty_state id="oval:ssg-ste_aide_is_active:ste:1" version="1" operator="AND">
      <linux:value>active</linux:value>
    </linux:systemdunitproperty_state>
  </oval-def:states>
</oval-def:oval_definitions>