Skip to content

Change applicability of some rules in containers and in Image Mode - #13899

Merged
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:cont_applicability_changes
Sep 24, 2025
Merged

Change applicability of some rules in containers and in Image Mode#13899
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:cont_applicability_changes

Conversation

@jan-cerny

@jan-cerny jan-cerny commented Sep 15, 2025

Copy link
Copy Markdown
Member

Description:

This PR changes platform key in multiple rules in order to change rule applicability in Image Mode and/or Container environment or both.

The most common changes:

  • mark rules related to systemd services as notapplicable in containers because containers typically don't run systemd and can't run services, they usually run a single process or single application
  • mark rules that depend on CPU or other hardware features as notapplicable in containers because containers don't have direct hardware access
  • mark rules related to log in or password management as notapplicable in containers because you typically don't login to containers

Rationale:

This change is based on our applicability analysis which we did for all rules used in any RHEL 10 profiles.
The goal is more consistent applicability results in different environments.

Review Hints:

I have run these contest tests on RHEL 10 using this PR as a custom pipeline and all of them passed:

  • /hardening/container/anaconda-ostree/
  • /hardening/container/bootc-image-builder
  • /hardening/container/old-new
  • /scanning/container-rules-applicability

The most common changes:
- mark rules related to systemd services as notapplicable in containers
  because containers typically don't run systemd and can't run services,
  they usually run a single process or single application
- mark rules that depend on CPU or other hardware features as
  notapplicable in containers because containers don't have direct
  hardware access
- mark rules related to log in or password management as notapplicable
  in containers because you typically don't login to containers
@jan-cerny jan-cerny added this to the 0.1.79 milestone Sep 15, 2025
@jan-cerny jan-cerny added RHEL10 Red Hat Enterprise Linux 10 product related. Image Mode Bootable containers and Image Mode RHEL labels Sep 15, 2025
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 15, 2025
@openshift-ci

openshift-ci Bot commented Sep 15, 2025

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jan-cerny

Copy link
Copy Markdown
Member Author

/packit build

@jan-cerny
jan-cerny marked this pull request as ready for review September 18, 2025 12:11
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Sep 18, 2025
@jan-cerny

Copy link
Copy Markdown
Member Author

/test e2e-aws-openshift-platform-compliance

@openshift-ci

openshift-ci Bot commented Sep 22, 2025

Copy link
Copy Markdown

@jan-cerny: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-platform-compliance 089e9d6 link true /test e2e-aws-openshift-platform-compliance
ci/prow/e2e-aws-openshift-node-compliance 089e9d6 link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@comps
comps self-requested a review September 24, 2025 13:30

@comps comps left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and it also fixes the recent failures in our automated container testing.

@Mab879 Mab879 self-assigned this Sep 24, 2025
@Mab879
Mab879 merged commit a83e946 into ComplianceAsCode:master Sep 24, 2025
131 of 134 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Image Mode Bootable containers and Image Mode RHEL RHEL10 Red Hat Enterprise Linux 10 product related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants