Bug 1533108

Summary: Generation of result-based remediation roles does not work for tailored profiles.
Product: Red Hat Enterprise Linux 7 Reporter: Matěj Týč <matyc>
Component: scap-workbenchAssignee: Matěj Týč <matyc>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact: Mirek Jahoda <mjahoda>
Priority: high    
Version: 7.5CC: cww, ldelouw, mhaicman, mjahoda, openscap-maint, rmullett, takirby
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
*SCAP Workbench* fails to generate results-based remediations from tailored profiles The following error occurs when trying to generate results-based remediation roles from a customized profile using the the *SCAP Workbench* tool: Error generating remediation role '.../remediation.sh': Exit code of 'oscap' was 1: [output truncated] To work around this problem, use the "oscap" command with the "--tailoring-file" option.
Story Points: ---
Clone Of:
: 1640715 (view as bug list) Environment:
Last Closed: 2019-10-16 20:51:05 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:
Bug Depends On:    
Bug Blocks: 1594286, 1640715    

Description Matěj Týč 2018-01-10 13:25:08 UTC
Description of problem:
Scap-workbench won't support generation of result-based remediation roles from tailored profiles. This is caused by a deficiency in openscap https://github.com/OpenSCAP/openscap/issues/902 that however may be fixed on the workbench side.

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

How reproducible:
Reliably

Steps to Reproduce:
1. Select any profile from any datastream.
2. Customize the profile, add any new rule to it.
3. Run the check, then choose to generate remediation.

Actual results:

Error will occur, the error message will be similar to:
Error generating remediation role '.../remediation.sh': Exit code of 'oscap' was 1: OpenSCAP Error: Could not find Profile/@id="..." to build policy from TestResult/@id="" [../../../src/XCCDF/xccdf_session.c:1738] 

Expected results:

The remediation script is generated without errors.

Additional info:
This is primarily caused by deficiency in OpenSCAP: https://github.com/OpenSCAP/openscap/issues/902

Comment 3 Marek Haicman 2018-05-16 15:57:12 UTC
*** Bug 1578907 has been marked as a duplicate of this bug. ***