RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2015518 - oscap complains about missing resources even though they were downloaded locally
Summary: oscap complains about missing resources even though they were downloaded locally
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2021-11-29
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openscap
Version: 9.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: Matus Marhefka
URL:
Whiteboard:
Depends On: 1970529
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-19 12:19 UTC by Matěj Týč
Modified: 2022-05-17 13:23 UTC (History)
7 users (show)

Fixed In Version: openscap-1.3.5-13.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 1970529
Environment:
Last Closed: 2022-05-17 13:04:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-101231 0 None None None 2021-11-01 13:28:16 UTC
Red Hat Product Errata RHBA-2022:2449 0 None None None 2022-05-17 13:04:49 UTC

Description Matěj Týč 2021-10-19 12:19:27 UTC
+++ This bug was initially created as a clone of Bug #1970529 +++

This bug was initially created as a copy of Bug #1970527

I am copying this bug because: 

Also applies, the difference being it doesn't complain bout using the local file anymore, but still the first warning is confusing:


With no local file:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
WARNING: Datastream component 'scap_org.open-scap_cref_security-data-oval-com.redhat.rhsa-RHEL8.xml' points out to the remote 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml'. Use '--fetch-remote-resources' option to download it.
WARNING: Skipping 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml' file which is referenced from datastream
WARNING: Skipping ./security-data-oval-com.redhat.rhsa-RHEL8.xml file which is referenced from XCCDF content
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

With local file:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
WARNING: Datastream component 'scap_org.open-scap_cref_security-data-oval-com.redhat.rhsa-RHEL8.xml' points out to the remote 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml'. Use '--fetch-remote-resources' option to download it.
WARNING: Skipping 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL8.xml' file which is referenced from datastream
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------


Description of problem:

When scanning offline systems, the resources have to be downloaded locally (explained in KCS https://access.redhat.com/solutions/5185891).
Unfortunately the scan continues to complain badly with the "WARNING: Skipping ..." messages, which is extremely confusing (hence the Severity High here).

I understand a message should pop up because there is no way to know the validity of the file, but the message should be different, something like "WARNING: Using local resource XXX.xml file, make sure the file is up-to-date".


Version-Release number of selected component (if applicable):

openscap-1.2.17-13.el7_9.x86_64 and later


How reproducible:

N/A

--- Additional comment from Jan Černý on 2021-07-29 06:49:01 UTC ---

The fix has been promoted to a documented feature and it has been merged into upstrem, see https://github.com/OpenSCAP/openscap/pull/1769

--- Additional comment from Jan Černý on 2021-08-05 10:41:14 UTC ---

Note for person who will fix the bug in RHEL: Please don't forget about https://github.com/OpenSCAP/openscap/pull/1786

--- Additional comment from Jan Černý on 2021-08-05 11:24:34 UTC ---

I'm changing priority and severity to low because I think it's an user experience problem and it doesn't mean that the user isn't able to run the scan.

--- Additional comment from Paulo Andrade on 2021-09-21 16:00:04 UTC ---

  Even after downloading the remote files, because openscap cannot
know if the files are up to date, the warning is still printed.

  There is a problem with ansible, because the messages are still
printed to stderr, and it treats it as an error. Workaround is to
use ansible with 'ignore_errors: true' what does not look ideal.

  Might need to clone and reassign this bug to use alternate options
https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html

Comment 13 errata-xmlrpc 2022-05-17 13:04:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: openscap), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2449


Note You need to log in before you can comment on or make changes to this bug.