CNF-22621: RAN Hardening (4.23) - Audit SELinux (M4)#675
CNF-22621: RAN Hardening (4.23) - Audit SELinux (M4)#675sebrandon1 wants to merge 1 commit intoopenshift-kni:mainfrom
Conversation
|
@sebrandon1: This pull request references CNF-22621 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
3aa2fb9 to
da5bc6f
Compare
📝 WalkthroughWalkthroughTwo new OpenShift MachineConfig resources are added to configure SELinux audit logging on cluster nodes. The configurations write audit rules targeting SELinux-related commands ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
da5bc6f to
0475bb6
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
telco-ran/configuration/machineconfigs/audit/75-audit-selinux-master.yaml (1)
23-23:⚠️ Potential issue | 🟡 MinorSame stale versioned documentation reference as worker manifest.
This file has the same
.../versions/4.21/...link in the embedded payload; please align it with the target hardening release context exactly as in the worker manifest update.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@telco-ran/configuration/machineconfigs/audit/75-audit-selinux-master.yaml` at line 23, The embedded documentation URL in the data:text/plain payload (the source field) still points to ".../compliance-scripts/versions/4.21/groups/M4.html"; update that URL in the source string to the correct target hardening release version (the same version used in the worker manifest update) so the documentation link inside the source payload matches the intended release.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@telco-ran/configuration/machineconfigs/audit/75-audit-selinux-worker.yaml`:
- Line 23: The embedded documentation URL in the YAML "source" field currently
points to "/versions/4.21/groups/M4.html"; update that URL to the appropriate
release (e.g., replace "4.21" with "4.22" or "4.23") or switch to a stable
non-versioned reference, ensuring the change is made inside the data:text/plain
payload string where the URL appears so the comment header now references the
correct release context.
---
Duplicate comments:
In `@telco-ran/configuration/machineconfigs/audit/75-audit-selinux-master.yaml`:
- Line 23: The embedded documentation URL in the data:text/plain payload (the
source field) still points to
".../compliance-scripts/versions/4.21/groups/M4.html"; update that URL in the
source string to the correct target hardening release version (the same version
used in the worker manifest update) so the documentation link inside the source
payload matches the intended release.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 508fdb56-d826-44fb-8715-b7895e1977b3
📒 Files selected for processing (2)
telco-ran/configuration/machineconfigs/audit/75-audit-selinux-master.yamltelco-ran/configuration/machineconfigs/audit/75-audit-selinux-worker.yaml
| # -a always,exit -F path=/usr/sbin/setfiles -F auid>=1000 -F auid!=unset -F key=privileged | ||
| # -a always,exit -F path=/usr/sbin/setsebool -F auid>=1000 -F auid!=unset -F key=privileged | ||
| # -a always,exit -F path=/usr/sbin/seunshare -F auid>=1000 -F auid!=unset -F key=privileged | ||
| source: data:text/plain,%23%20M4%3A%20Audit%20SELinux%20Commands%20%28E8%20Compliance%29%0A%23%20Documentation%3A%20https%3A%2F%2Fsebrandon1.github.io%2Fcompliance-scripts%2Fversions%2F4.21%2Fgroups%2FM4.html%0A%0A-a%20always%2Cexit%20-F%20path%3D%2Fusr%2Fbin%2Fchcon%20-F%20auid%3E%3D1000%20-F%20auid%21%3Dunset%20-F%20key%3Dprivileged%0A-a%20always%2Cexit%20-F%20path%3D%2Fusr%2Fsbin%2Frestorecon%20-F%20auid%3E%3D1000%20-F%20auid%21%3Dunset%20-F%20key%3Dprivileged%0A-a%20always%2Cexit%20-F%20path%3D%2Fusr%2Fsbin%2Fsemanage%20-F%20auid%3E%3D1000%20-F%20auid%21%3Dunset%20-F%20key%3Dprivileged%0A-a%20always%2Cexit%20-F%20path%3D%2Fusr%2Fsbin%2Fsetfiles%20-F%20auid%3E%3D1000%20-F%20auid%21%3Dunset%20-F%20key%3Dprivileged%0A-a%20always%2Cexit%20-F%20path%3D%2Fusr%2Fsbin%2Fsetsebool%20-F%20auid%3E%3D1000%20-F%20auid%21%3Dunset%20-F%20key%3Dprivileged%0A-a%20always%2Cexit%20-F%20path%3D%2Fusr%2Fsbin%2Fseunshare%20-F%20auid%3E%3D1000%20-F%20auid%21%3Dunset%20-F%20key%3Dprivileged%0A |
There was a problem hiding this comment.
Update the embedded documentation URL to the current release context.
The payload still points to .../versions/4.21/..., while this PR is for 4.22/4.23 hardening. Keeping an older versioned compliance link can create audit traceability confusion during evidence reviews. Please switch to the correct version (or a stable non-versioned reference).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@telco-ran/configuration/machineconfigs/audit/75-audit-selinux-worker.yaml` at
line 23, The embedded documentation URL in the YAML "source" field currently
points to "/versions/4.21/groups/M4.html"; update that URL to the appropriate
release (e.g., replace "4.21" with "4.22" or "4.23") or switch to a stable
non-versioned reference, ensuring the change is made inside the data:text/plain
payload string where the URL appears so the comment header now references the
correct release context.
Summary
auditctl -lRemediation Group
Jira
Test plan
auditctl -l