Skip to content

Create new rule file_permissions_cron_not_modified#14901

Open
jan-cerny wants to merge 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:file_permissions_cron_not_modified
Open

Create new rule file_permissions_cron_not_modified#14901
jan-cerny wants to merge 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:file_permissions_cron_not_modified

Conversation

@jan-cerny

Copy link
Copy Markdown
Collaborator

This rule implements RHEL 10 STIG requirement RHEL-10-400230: RHEL 10 must be configured to prohibit modification of permissions for cron configuration files and directories from the operating system defaults.

The new rule matches the check and fix texts in the STIG requirement better than the currently selected rules. It uses the STIG suggested implementation of matching the configuration files against RPM database instead of checking the permissions directly like the existing rules.

This rule implements RHEL 10 STIG requirement RHEL-10-400230:
RHEL 10 must be configured to prohibit modification of permissions
for cron configuration files and directories from the operating
system defaults.

The new rule matches the check and fix texts in the STIG requirement
better than the currently selected rules. It uses the STIG
suggested implementation of matching the configuration files against
RPM database instead of checking the permissions directly like
the existing rules.
@jan-cerny jan-cerny added this to the 0.1.82 milestone Jul 17, 2026
@jan-cerny jan-cerny added New Rule Issues or pull requests related to new Rules. STIG STIG Benchmark related. labels Jul 17, 2026
@jan-cerny
jan-cerny requested review from a team, Mab879 and matusmarhefka as code owners July 17, 2026 11:48
@jan-cerny jan-cerny added the RHEL10 Red Hat Enterprise Linux 10 product related. label Jul 17, 2026
@Mab879 Mab879 self-assigned this Jul 17, 2026
@@ -0,0 +1,5 @@
#!/bin/bash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add tests for invalid user? We check and fixing those?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is similar as in the other PR for sshd. There are other requirements in RHEL 10 STIG that check for file owners and groups:
https://stigaview.com/products/rhel10/v1r2/RHEL-10-400130/
https://stigaview.com/products/rhel10/v1r2/RHEL-10-400135/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But this PR is fixing permissions should we remove that from this PR?

@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown

@jan-cerny: The following test 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-node-compliance a815b67 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Rule Issues or pull requests related to new Rules. RHEL10 Red Hat Enterprise Linux 10 product related. STIG STIG Benchmark related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants