Replace SCE checks with OVAL for all_apparmor_profiles_enforced and c…#14773
Open
israel-villar wants to merge 2 commits into
Open
Replace SCE checks with OVAL for all_apparmor_profiles_enforced and c…#14773israel-villar wants to merge 2 commits into
israel-villar wants to merge 2 commits into
Conversation
…heck_ufw_active SCE scripts are executed by OpenSCAP by writing them to /tmp and running them. When /tmp has the noexec mount option (required by CIS 1.1.2.4), the scripts fail silently, producing incorrect results. - all_apparmor_profiles_enforced: add OVAL check that counts profiles in /sys/kernel/security/apparmor/profiles and verifies all are in enforce mode; remove sce/shared.sh; extend bash remediation to Debian products. - check_ufw_active: add OVAL check that reads ENABLED=yes from /etc/ufw/ufw.conf; add bash remediation for Debian; remove sce/shared.sh. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hi @israel-villar. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
The rule already has an OVAL check (oval/shared.xml) that verifies the sum of enforced + complaining profiles equals the total loaded profiles. The SCE script fails silently when /tmp has the noexec mount option (required by CIS 1.1.2.4), since OpenSCAP writes scripts to /tmp before executing them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
…heck_ufw_active
SCE scripts are executed by OpenSCAP by writing them to /tmp and running them. When /tmp has the noexec mount option (required by CIS 1.1.2.4), the scripts fail silently, producing incorrect results.
Description:
all_apparmor_profiles_enforced: addoval/shared.xmlthat reads/sys/kernel/security/apparmor/profilesand verifies all profiles arein enforce mode; remove
sce/shared.sh; extend bash remediation toDebian products.
check_ufw_active: addoval/shared.xmlthat checksENABLED=yesin
/etc/ufw/ufw.conf; addbash/shared.shfor Debian and Ubuntu;remove
sce/shared.sh.Rationale:
/tmpand runningthem. When
/tmphas thenoexecmount option — required byCIS 1.1.2.4 — the scripts fail silently, producing incorrect scan
results.
Review Hints:
debian13andubuntu2404to verify no regression:./build_product debian13 --datastream-only./build_product ubuntu2404 --datastream-only/tmpwithnoexecandscan with the SCE-based content — both rules return pass regardless
of system state.