-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
rhel-10.0
-
None
-
None
-
None
-
rhel-sst-security-compliance
-
ssg_security
-
None
-
False
-
-
No
-
None
-
None
-
None
-
Unspecified Release Note Type - Unknown
-
None
What were you trying to do that didn't work?
I tried to evaluate an OVAL defintion using oscap-chroot command. The definition contains OVAL rpminfo_test. OpenSCAP didn't find the queried RPM package in the chroot and didn't collect any item, but the queried RPM package exists in the chroot.
Debugging revealed that in rpminfo_probe.c on line 190 rpmtsInitIterator() returns NULL instead of a match iterator. But we don't know the reason of this.
An analogous situation also happens for rpmverifyfile_probe.
Please provide the package NVR for which bug is seen:
openscap-1.3.10-2.el10.x86_64
How reproducible:
deterministic
Steps to reproduce
dnf install -y openscap-scanner policycoreutils-python-utils
CHROOT_DIR="/chroot_dir"
rm -rf $CHROOT_DIR
mkdir $CHROOT_DIR
semanage fcontext -a -e /var/lib $CHROOT_DIR
restorecon -Rv $CHROOT_DIR
mkdir -p $CHROOT_DIR/var/lib/rpm
rpm --root $CHROOT_DIR --initdb
dnf -y --installroot=$CHROOT_DIR install $RLS_PKG filesystem yum rpm bash coreutils
oscap-chroot $CHROOT_DIR oval eval --results results.xml package_test.xml
Expected results
OVAL results should contain an rpminfo_item representing a package. The definition oval:ssg-package_bash_installed:def:1: should be evaluated as true
Actual results
OVAL results doesn't contain an rpminfo_item representing a package. The definition oval:ssg-package_bash_installed:def:1: is evaluated as false