Sep0lkit / oval-for-el

OVAL For CentOS
https://github.com/Sep0lkit/oval-for-el
24 stars 12 forks source link

notapplicable for Centos8.3 #3

Open ichasco opened 3 years ago

ichasco commented 3 years ago

Hi,

I am getting problems with the last upgrade of Centos. With 8.2 works perfect, but with 8.3 doesn't apply.

Thanks!!

ichasco commented 3 years ago

Is because in CentOS 8.3 the linux name file change to centos-linux-release

https://github.com/OpenSCAP/openscap/issues/1661

guillemlc commented 3 years ago

I have updated versions and I get hit by the same in 8.4:

https://github.com/OpenSCAP/openscap/issues/1661#issuecomment-883302813


I am finding the same issue with CentOS 8.4. The file is correctly already using /etc/os-release, but it still gives me a not-applicable for all tests

          <ind:filepath>/etc/os-release</ind:filepath>
          <ind:pattern operation="pattern match">^ID="(\w+)"$</ind:pattern>
          <ind:instance datatype="int">1</ind:instance>
        </ind:textfilecontent54_object>
        <ind:textfilecontent54_object comment="Check os-release VERSION_ID" id="oval:ssg-obj_version_centos8:obj:1" version="1">
          <ind:filepath>/etc/os-release</ind:filepath>
          <ind:pattern operation="pattern match">^VERSION_ID="(\d)"$</ind:pattern>
          <ind:instance datatype="int">1</ind:instance>
        </ind:textfilecontent54_object>```

For example:

```oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cui  --fetch-remote-resources --report ssg-centos8-CIS-xccdf.html /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml 

Downloading: https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml ... ok

Title   Install AIDE
Rule    xccdf_org.ssgproject.content_rule_package_aide_installed
Ident   CCE-80844-4
Result  notapplicable

Same for all the other checks.

My /etc/os-release:


# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"```