Bug 1750755 - Some rules fail because of ordering in benchmark or because of dependency on another rule
Summary: Some rules fail because of ordering in benchmark or because of dependency on ...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: scap-security-guide
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.2
Assignee: Watson Yuuma Sato
QA Contact: BaseOS QE Security Team
Jan Fiala
URL:
Whiteboard:
: 1768512 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-10 12:30 UTC by Matus Marhefka
Modified: 2019-11-29 17:17 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

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. ***


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