content icon indicating copy to clipboard operation
content copied to clipboard

Disable remediation for accounts_umask_interactive_users on Ubuntu

Open mpurg opened this issue 1 year ago • 4 comments

Description:

  • Disable remediation for rule accounts_umask_interactive_users on Ubuntu by redefining the platform keyword.

Rationale:

  • Remediation is too intrusive and modifies files in user's home directory.
  • The CIS guide (Ubuntu 22.04 v1, also RHEL8 v3), although it mentions ~/.bashrc and ~/.profile, does not actually audit or fix files in user's home directory. In this PR we only remove the fix and retain the audit as it can be useful to the user and is not intrusive.

Additional information

Individual platforms are defined based on the following output. Note that in many cases, the rule is listed under 'related_rules' and is thus not used to generate the content.

$ git grep "- accounts_umask_interactive_users" products/ controls/
controls/cis_rhel7.yml:      - accounts_umask_interactive_users
controls/cis_rhel8.yml:      - accounts_umask_interactive_users
controls/srg_gpos/SRG-OS-000480-GPOS-00227.yml:            - accounts_umask_interactive_users
controls/stig_rhel9.yml:            - accounts_umask_interactive_users
products/ol7/profiles/stig.profile:    - accounts_umask_interactive_users
products/ol8/profiles/stig.profile:    - accounts_umask_interactive_users
products/rhel7/profiles/rhelh-stig.profile:    - accounts_umask_interactive_users
products/rhel7/profiles/stig.profile:    - accounts_umask_interactive_users
products/rhel8/profiles/stig.profile:    - accounts_umask_interactive_users
products/rhv4/profiles/rhvh-stig.profile:    - accounts_umask_interactive_users
products/sle15/profiles/default.profile:    - accounts_umask_interactive_users
products/ubuntu2004/profiles/cis_level1_server.profile:    - accounts_umask_interactive_users
products/ubuntu2204/profiles/cis_level1_server.profile:    - accounts_umask_interactive_users

mpurg avatar Feb 16 '24 16:02 mpurg

Hi @mpurg. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

openshift-ci[bot] avatar Feb 16 '24 16:02 openshift-ci[bot]

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment Open in Gitpod

Oracle Linux 8 Environment Open in Gitpod

github-actions[bot] avatar Feb 16 '24 16:02 github-actions[bot]

Code Climate has analyzed commit d24cf5a7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 58.3% (0.0% change).

View more on Code Climate.

qlty-cloud-legacy[bot] avatar Feb 16 '24 16:02 qlty-cloud-legacy[bot]

FYI @Xeicker

marcusburghardt avatar Feb 19 '24 08:02 marcusburghardt