CMP-3628: fixed rule to allow kubelet to kubelet to be unconfined#14700
Open
vickeybrown wants to merge 1 commit intoComplianceAsCode:masterfrom
Open
CMP-3628: fixed rule to allow kubelet to kubelet to be unconfined#14700vickeybrown wants to merge 1 commit intoComplianceAsCode:masterfrom
vickeybrown wants to merge 1 commit intoComplianceAsCode:masterfrom
Conversation
|
This datastream diff is auto generated by the check Click here to see the full diffOVAL for rule 'xccdf_org.ssgproject.content_rule_selinux_confinement_of_daemons' differs.
--- oval:ssg-selinux_confinement_of_daemons:def:1
+++ oval:ssg-selinux_confinement_of_daemons:def:1
@@ -1,2 +1,3 @@
-criteria AND
-criterion oval:ssg-test_selinux_confinement_of_daemons:tst:1
+criteria OR
+criterion oval:ssg-test_no_unconfined_service_t_processes:tst:1
+criterion oval:ssg-test_only_kubelet_unconfined:tst:1 |
7541243 to
151f0b6
Compare
Mab879
requested changes
May 8, 2026
Member
There was a problem hiding this comment.
$ ./automatus.py rule --datastream ../build/ssg-rhel9-ds.xml [vm name] --remediate-using bash selinux_confinement_of_daemons
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/mburket/Developer/github.com/ComplianceAsCode/content/tests/logs/rule-custom-2026-05-08-1354/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_selinux_confinement_of_daemons
INFO - Script kubelet_unconfined.pass.sh using profile (all) OK
INFO - Script no_unconfined_daemons.pass.sh using profile (all) OK
ERROR - Script unconfined_daemon.fail.sh using profile (all) found issue:
ERROR - Rule evaluation resulted in pass, instead of expected fail during initial stage
ERROR - The initial scan failed for rule 'xccdf_org.ssgproject.content_rule_selinux_confinement_of_daemons'.
Please double check the tests for this rule.
|
@vickeybrown: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Re-enable
selinux_confinement_of_daemonsrule for RHCOS4 with kubeletexclusion. This rule was temporarily disabled in February 2023 because kubelet
ran with
unconfined_service_tin OCP 4.12, causing the rule to fail. ThisPR updates the OVAL check to exclude kubelet processes, allowing the rule to
pass whether kubelet runs as
unconfined_service_t(OCP 4.12) orkubelet_t(OCP 4.13+).
The OVAL check now uses an OR condition:
unconfined_service_tunconfined_service_tprocesses are kubeletRationale:
Disabling the rule completely means that ANY daemon could run unconfined
without triggering a compliance failure. By re-enabling the rule with a
kubelet exclusion, we restore security coverage while accounting for kubelet's
legitimate use of
unconfined_service_tin OCP 4.12.Fixes https://redhat.atlassian.net/browse/CMP-3628
Review Hints:
Test on OCP 4.12 cluster (where kubelet has
unconfined_service_t):ps -eZ | grep kubeletshowssystem_u:system_r:unconfined_service_t:s0Test on OCP 4.13+ cluster (where kubelet has
kubelet_t):ps -eZ | grep kubeletshowssystem_u:system_r:kubelet_t:s0