Bug 1750755

Summary: Some rules fail because of ordering in benchmark or because of dependency on another rule
Product: Red Hat Enterprise Linux 8 Reporter: Matus Marhefka <mmarhefk>
Component: scap-security-guideAssignee: Watson Yuuma Sato <wsato>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact: Jan Fiala <jafiala>
Priority: high    
Version: 8.1CC: ggasparb, mhaicman, mjahoda, vpolasek
Target Milestone: rc   
Target Release: 8.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
.Certain sets of interdependent rules in SSG can fail Remediation of `SCAP Security Guide` (SSG) rules in a benchmark can fail due to undefined ordering of rules and their dependencies. If two or more rules need to be executed in a particular order, for example, when one rule installs a component and another rule configures the same component, they can run in the wrong order and remediation reports an error. To work around this problem, run the remediation twice, and the second run fixes the dependent rules.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-10 07:31:02 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 Matus Marhefka 2019-09-10 12:30:49 UTC
Description of problem:
Some rules fail because of ordering in benchmark or because of dependency on another rule.

Example of a problem with ordering:
There are 2 rules in a benchmark ordered in the following way:
1. "Enable foo service"
2. "Install package foo"
If both rules are asserted as fail openscap will remediate them with result:
1: error
2: fixed
The rule remediation #1 will result in error because service foo is not yet installed on the system and it will be installed in the rule remediation #2 which will result in fixed. Also additional scan will result with fail for the rule #1 and pass for the rule #2.


Example of a problem with dependency:
There are 2 rules in a benchmark ordered in the following way:
1. Prevent user from disabling the screen lock (tmux should not be listed in /etc/shells file)
2. Install the tmux Package
The tmux package is not installed by default, therefore result of remediation will be:
1: pass
2: fixed
But additional scan of the system will result in:
1: fail
2: pass
This is because the remediation of the rule #2 will add tmux into the /etc/shells file which will make the rule #1 to fail.


Version-Release number of selected component (if applicable):
scap-security-guide-0.1.46-1.el8


How reproducible:
always

Comment 2 Watson Yuuma Sato 2019-10-07 16:54:50 UTC
PR https://github.com/ComplianceAsCode/content/pull/4900 helps with ordering problem, but it doesn't solve the dependency problem.

Comment 6 Matus Marhefka 2019-11-15 13:03:14 UTC
*** Bug 1768512 has been marked as a duplicate of this bug. ***

Comment 9 RHEL Program Management 2021-03-10 07:31:02 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.