<def-group>
  <definition class="compliance" id="ensure_gpgcheck_never_disabled"
  version="1">
    {{{ oval_metadata("Ensure all yum or dnf repositories utilize signature checking.") }}}
    <criteria comment="ensure all yum or dnf repositories utilize signiature checking" operator="AND">
      <criterion comment="verify no gpgpcheck=0 present in /etc/yum.repos.d files"
      test_ref="test_ensure_gpgcheck_never_disabled" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="none_exist"
  comment="check for existence of gpgcheck=0 in /etc/yum.repos.d/ files"
  id="test_ensure_gpgcheck_never_disabled" version="1">
    <ind:object object_ref="obj_ensure_gpgcheck_never_disabled" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_ensure_gpgcheck_never_disabled"
  version="1">
  {{%- if product in ["sle12", "sle15", "slmicro5"] %}}
      <ind:path>/etc/zypp/repos.d</ind:path>
  {{%- else %}}
      <ind:path>/etc/yum.repos.d</ind:path>
  {{%- endif %}}
    <ind:filename operation="pattern match">.*</ind:filename>
    <ind:pattern operation="pattern match">^\s*gpgcheck\s*=\s*0\s*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
