Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1781074

Summary: scap-workbench fails when using the firefox profile
Product: Red Hat Enterprise Linux 8 Reporter: Christophe Besson <cbesson>
Component: scap-workbenchAssignee: Matěj Týč <matyc>
Status: CLOSED ERRATA QA Contact: Matus Marhefka <mmarhefk>
Severity: medium Docs Contact:
Priority: high    
Version: 8.1CC: ableisch, jcerny, lcervako, mhaicman, mthacker, wsato
Target Milestone: rcKeywords: Regression, Reproducer
Target Release: 8.2Flags: pm-rhel: mirror+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: scap-workbench-1.2.0-4.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:04:54 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:
Attachments:
Description Flags
scap-workbench strace
none
strace of scap-workbench from the GUI
none
Result with regression (scap-workbench-1.2.0-3.el8)
none
Result with fix (scap-workbench-1.2.0-4.el8) none

Description Christophe Besson 2019-12-09 09:36:15 UTC
Created attachment 1643231 [details]
scap-workbench strace

Description of problem:
While selecting the Firefox profile/policy to run a scan, the following message appeared in the console:
04:42:08 | info     | Querying capabilities...
04:42:08 | info     | Creating temporary files...
04:42:08 | info     | Starting the oscap process...
04:42:08 | info     | Processing...
04:42:08 | warning  | Error when parsing scan progress output from stdout of the 'oscap' process. ':' encountered while not reading rule ID, newline and/or rule result are missing! Read buffer is 'WARNING'.
04:42:08 | warning  | Error when parsing scan progress output from stdout of the 'oscap' process. ':' encountered while not reading rule ID, newline and/or rule result are missing! Read buffer is ' Skipping rule that requires an unregistered check system or incorrect content reference to evaluate. Please consider providing a valid SCAP/OVAL instead of http'.
04:42:08 | warning  | Error when parsing scan progress output from stdout of the 'oscap' process. Newline encountered while reading rule ID, rule result and/or ':' are missing! Read buffer is 'notchecked'.
04:42:08 | warning  | Error when parsing scan progress output from stdout of the 'oscap' process. ':' encountered while not reading rule ID, newline and/or rule result are missing! Read buffer is 'WARNING'.
04:42:08 | warning  | Error when parsing scan progress output from stdout of the 'oscap' process. ':' encountered while not reading rule ID, newline and/or rule result are missing! Read buffer is ' Skipping rule that requires an unregistered check system or incorrect content reference to evaluate. Please consider providing a valid SCAP/OVAL instead of http'.
04:42:08 | warning  | Error when parsing scan progress output from stdout of the 'oscap' process. Newline encountered while reading rule ID, rule result and/or ':' are missing! Read buffer is 'notchecked'.
04:42:09 | info     | The oscap tool has finished. Reading results...
04:42:09 | info     | Processing has been finished!

Version-Release number of selected component (if applicable):
scap-workbench-1.2.0-3.el8.x86_64

Steps to Reproduce:
1. Install the needed packages:
# yum install scap-security-guide scap-workbench firefox xorg-x11-xauth
2. Launch the GUI with:
# scap-workbench & 
3. Select "Firefox" in the first screen, then click on the "Scan" button.

Actual results:
Messages above appears on the console.

Expected results:
Working scan.

Additional info:
I attach the related strace, but I don't think that can help to find out what happens.

Comment 1 Marek Haicman 2019-12-09 11:32:10 UTC
Hello, thank you for reporting this behavior!

The issue is not functional in nature. Culprit is increased verbosity of `oscap` command line utility. When OVAL is missing, output is like that:

Title   The DoD Root Certificate Exists
Rule    xccdf_org.ssgproject.content_rule_firefox_preferences-dod_root_certificate_installed
Ident   CCE-82056-3
WARNING: Skipping rule that requires an unregistered check system or incorrect content reference to evaluate. Please consider providing a valid SCAP/OVAL instead of http://scap.nist.gov/schema/ocil/2
Result  notchecked

Title   Enable Shared System Certificates
Rule    xccdf_org.ssgproject.content_rule_firefox_preferences-enable_ca_trust
Ident   CCE-82057-1
WARNING: Skipping rule that requires an unregistered check system or incorrect content reference to evaluate. Please consider providing a valid SCAP/OVAL instead of http://scap.nist.gov/schema/ocil/2
Result  notchecked

Notice the WARNING line.

SCAP Workbench fails to understand this new output, and prints out these awful lines. Workaround is - ignore these particular warnings.

Comment 2 Christophe Besson 2019-12-11 11:18:10 UTC
The customer saw these errors message on stderr:

08:25:10 error    The 'oscap' process has written the following content to stderr: chown: cannot access '/tmp/SCAP': No such file or directory 
08:25:10 error    The 'oscap' process has written the following content to stderr: chown: cannot access 'Workbench.bGnNch': No such file or directory 

08:25:10 error    The 'oscap' process has written the following content to stderr: chown: cannot access '/tmp/SCAP': No such file or directory 
08:25:10 error    The 'oscap' process has written the following content to stderr: chown: cannot access 'Workbench.FYmUgl': No such file or directory 

This looks like the filename contained a space "/tmp/SCAP Workbench.FYmUgl" and wasn't quoted properly. Best solution would be to avoid whitespaces entirely.

It seems to be a known issue:
https://github.com/OpenSCAP/scap-workbench/issues/196


Are you sure this is not a functional issue?

Comment 3 Christophe Besson 2019-12-11 11:59:40 UTC
Created attachment 1643861 [details]
strace of scap-workbench from the GUI

Comment 4 Christophe Besson 2019-12-11 12:02:15 UTC
I uploaded a new strace, as I reproduced the customer issue only through the GUI (error messages didn't appear through "ssh -X"...).
Maybe this bug should be moved to the "openscap-scanner" component.

Comment 5 Andreas Bleischwitz 2019-12-11 14:12:32 UTC
The issue may be caused by using the default template of QTemporaryFile() which uses QCoreApplication::applicationName() suffixed by some arbitrary numbers:

QTemporaryFile::QTemporaryFile()
  Constructs a QTemporaryFile using as file template the application name returned by QCoreApplication::applicationName() (otherwise qt_temp) followed by ".XXXXXX".
  The file is stored in the system's temporary directory, QDir::tempPath().

In order to avoid those whitespaces QTemporaryFile() will need to get a suitable template as parameter or QTemporaryFile::setFileTemplate() to be initailized.

Comment 6 Jan Černý 2020-01-06 15:30:18 UTC
The spaces in temporary files names will be remove by https://github.com/OpenSCAP/scap-workbench/pull/239

Comment 7 Matěj Týč 2020-01-08 14:54:43 UTC
Fixed by that PR.

Comment 11 Matus Marhefka 2020-02-10 14:06:59 UTC
Created attachment 1662153 [details]
Result with regression (scap-workbench-1.2.0-3.el8)

Comment 12 Matus Marhefka 2020-02-10 14:10:41 UTC
Created attachment 1662154 [details]
Result with fix (scap-workbench-1.2.0-4.el8)

Comment 15 errata-xmlrpc 2020-04-28 16:04:54 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, 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-2020:1748