Bug 1992229
Summary: | OpenSCAP scan fails with error "invalid byte sequence in UTF-8" | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Jessica Hanley <jhanley> |
Component: | SCAP Plugin | Assignee: | Oleh Fedorenko <ofedoren> |
Status: | CLOSED ERRATA | QA Contact: | Peter Ondrejka <pondrejk> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.9.0 | CC: | ahumbe, akapse, hyu, jordi.m.rubalcaba, jpasqual, jrichards2, mhulan, pmendezh, ramsingh, rdesouza, zhunting |
Target Milestone: | 6.15.0 | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rubygem-foreman_scap_client-0.5.2 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-04-23 17:26:25 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jessica Hanley
2021-08-10 18:42:20 UTC
Created redmine issue https://projects.theforeman.org/issues/33914 from this bug This also happens on RHEL7, if the error output of the oscap command contains an invalid byte sequence Worked with 3rd workaround in RHEL 8.5. Filename: /usr/share/gems/gems/foreman_scap_client-0.5.0/lib/foreman_scap_client/base_client.rb #puts error_str.split("\n").select { |item| item.start_with?('WARNING:') || item.start_with?('Downloading') }.join("\n") Thanks, Based on what I have tested... Install the foreman_scap_client package on your hosts. # yum install rubygem-foreman_scap_client --assumeyes The above package creates/restores file: /usr/share/gems/gems/foreman_scap_client-0.5.1/lib/foreman_scap_client/base_client.rb comment line 84, to ensure oscap scans continue to work because if you reinstall package rubygem-foreman_scap_client, the comment in line 84 will be removed. I have not tested in RHEL 8, but On RHEL 7 and RHEL 9 systems it is line: **84** in file /usr/share/gems/gems/foreman_scap_client-0.5.1/lib/foreman_scap_client/base_client.rb To gather scans from the Satellite web UI: Step 1: Navigate to Hosts> Select Action>drop_down> Run All Ansible roles. Step 2: Navigate to Hosts> Select desired host> Schedule a job>drop_down> Run OpenScap Scan. Wait until job completes. Step 3: Navigate to Hosts> Compliance>Reports. Likewise, execute the command below from the hosts and the report will be uploaded to the Satellite Web UI. The number '1' is the Scap Scan Policy number created in Satellite. # /usr/bin/foreman_scap_client 1 Upstream bug assigned to ofedoren Upstream bug assigned to ofedoren Verified on Satellite 6.15 sn 8 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 (Important: Satellite Client Async Security Update), 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/RHSA-2024:2011 |