Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new rule rsyslog_filecreatemode #10264

Merged
merged 13 commits into from
Mar 10, 2023

Conversation

dodys
Copy link
Contributor

@dodys dodys commented Feb 27, 2023

Description:

Rationale:

  • This rule is needed for CIS on Ubuntu, RHEL and SLES as far as I know, might be needed for other vendors as well.

@dodys dodys requested review from a team February 27, 2023 20:14
@dodys dodys requested a review from a team as a code owner February 27, 2023 20:14
@github-actions
Copy link

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

ubuntu2004 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@github-actions
Copy link

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
New content has different text for rule 'xccdf_org.ssgproject.content_rule_rsyslog_files_permissions'.
--- xccdf_org.ssgproject.content_rule_rsyslog_files_permissions
+++ xccdf_org.ssgproject.content_rule_rsyslog_files_permissions
@@ -65,9 +65,6 @@
 [reference]:
 Req-10.5.2
 
-[reference]:
-4.2.1.4
-
 [rationale]:
 Log files can contain valuable information regarding system
 configuration. If the system log files are not protected unauthorized

@dodys
Copy link
Contributor Author

dodys commented Feb 28, 2023

@teacup-on-rockingchair fyi, as we discussed in gitter

@marcusburghardt marcusburghardt self-assigned this Feb 28, 2023
@marcusburghardt marcusburghardt added this to the 0.1.67 milestone Feb 28, 2023
@marcusburghardt marcusburghardt added RHEL Red Hat Enterprise Linux product related. SLES SUSE Linux Enterprise Server product related. Ubuntu Ubuntu product related. CIS CIS Benchmark related. labels Feb 28, 2023
Copy link
Member

@marcusburghardt marcusburghardt left a comment

Choose a reason for hiding this comment

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

Thanks for this rule @dodys . Please, take a look in my comments to make it simpler.

@dodys dodys requested a review from marcusburghardt March 2, 2023 08:12
Copy link
Member

@marcusburghardt marcusburghardt left a comment

Choose a reason for hiding this comment

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

Amazing @dodys . I really liked the new approach. Much simpler and easier to review. I have only minor comments and we should be ready. I also tested this rule in RHEL products and it is working fine. I will be happy to propose the Ansible remediation for it soon.

@dodys dodys requested a review from marcusburghardt March 2, 2023 18:06
@codeclimate
Copy link

codeclimate bot commented Mar 7, 2023

Code Climate has analyzed commit 468cfb8 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 51.7% (0.0% change).

View more on Code Climate.

@marcusburghardt
Copy link
Member

Automatus tests are failing because the rule is restricted to ubuntu. Waived!

@Mab879 Mab879 added the New Rule Issues or pull requests related to new Rules. label Mar 10, 2023
Copy link
Member

@marcusburghardt marcusburghardt left a comment

Choose a reason for hiding this comment

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

Thanks for the work in this new rule @dodys . The last update in the bash remediation is working fine in my tests too.

@marcusburghardt
Copy link
Member

Overriding CODEOWNERS since a @dodys can't approve his own PR.

@marcusburghardt
Copy link
Member

My last tests finished and actually some two test scenarios are failing in RHEL7 only. I quickly checked and it seems to be a minor issue related to compatibility. Since this rule will be interesting for CIS in RHEL7 and I plan to include it pretty soon, I am fine to merge it now and fix any possible issue in RHEL7 when enabling this rule for RHEL.

@marcusburghardt marcusburghardt merged commit ce820eb into ComplianceAsCode:master Mar 10, 2023
@marcusburghardt
Copy link
Member

My last tests finished and actually some two test scenarios are failing in RHEL7 only. I quickly checked and it seems to be a minor issue related to compatibility. Since this rule will be interesting for CIS in RHEL7 and I plan to include it pretty soon, I am fine to merge it now and fix any possible issue in RHEL7 when enabling this rule for RHEL.

Fixed in #10328

@dodys dodys deleted the rsyslog branch April 17, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CIS CIS Benchmark related. New Rule Issues or pull requests related to new Rules. RHEL Red Hat Enterprise Linux product related. SLES SUSE Linux Enterprise Server product related. Ubuntu Ubuntu product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants