Bug 2209655

Summary: More complete CIS SELinux remediation
Product: Red Hat Enterprise Linux 9 Reporter: Marko Myllynen <myllynen>
Component: scap-security-guideAssignee: Watson Yuuma Sato <wsato>
Status: CLOSED MIGRATED QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.2CC: ggasparb, matyc, mhaicman, mlysonek, openscap-maint, vpolasek
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-18 07:27:31 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 Marko Myllynen 2023-05-24 11:52:27 UTC
Description of problem:
CIS RHEL 9 Benchmark 1.0.0 PDF states that SELinux changes are monitored and mentions /etc/selinux and /usr/share/selinux.

scap-security-guide-0.1.66-1.el9_1 only creates the following so /usr/share/selinux is not included:

# grep -ri selinux /etc/audit/rules.d/
/etc/audit/rules.d/MAC-policy.rules:-w /etc/selinux/ -p wa -k MAC-policy

But if adding a custom policy that would be configured in /var/lib/selinux.

It looks like at least for CIS oscap should include at least /usr/share/selinux in /etc/audit/rules.d/MAC-policy.rules, perhaps also /var/lib/selinux.

Thanks.

Comment 2 Vojtech Polasek 2023-05-25 08:41:09 UTC
Hello Marko,
this has been partially fixed already - a rule enforcing Audit watch for /usr/share/selinux is already in upstream:
https://github.com/ComplianceAsCode/content/pull/10231
So this will be part of a future release.
Regarding /var/lib/selinux, we will probably suggest this new rule to the CIS community.

Comment 3 Marko Myllynen 2023-05-25 08:48:02 UTC
Thanks for pointing out a corresponding upstream change (again), I'll make sure going forward I'll also scan upstream changes and tickets in addition to RHBZs. Thanks.

Comment 4 RHEL Program Management 2023-08-17 14:26:22 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 5 RHEL Program Management 2023-08-18 07:27:31 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues.