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

Update file_permissions_etc_chrony_keys to 640 #12577

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Nov 5, 2024

Description:

Update file_permissions_etc_chrony_keys to 640

Rationale:

Follow maintainer guidance.

@Mab879 Mab879 added the Update Rule Issues or pull requests related to Rules updates. label Nov 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

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

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

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

github-actions bot commented Nov 5, 2024

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_file_permissions_etc_chrony_keys'.
--- xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys
+++ xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys
@@ -3,7 +3,7 @@
 Verify Permissions On /etc/chrony.keys File
 
 [description]:
-To properly set the permissions of /etc/chrony.keys, run the command: $ sudo chmod 0644 /etc/chrony.keys
+To properly set the permissions of /etc/chrony.keys, run the command: $ sudo chmod 0640 /etc/chrony.keys
 
 [reference]:
 R50

OCIL for rule 'xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys' differs.
--- ocil:ssg-file_permissions_etc_chrony_keys_ocil:questionnaire:1
+++ ocil:ssg-file_permissions_etc_chrony_keys_ocil:questionnaire:1
@@ -2,6 +2,6 @@
 run the command:
 $ ls -l /etc/chrony.keys
 If properly configured, the output should indicate the following permissions:
-0644
-      Is it the case that /etc/chrony.keys does not have unix mode 0644?
+0640
+      Is it the case that /etc/chrony.keys does not have unix mode 0640?
       
bash remediation for rule 'xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys' differs.
--- xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys
+++ xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys
@@ -1,7 +1,7 @@
 # Remediation is applicable only in certain platforms
 if rpm --quiet -q kernel; then
 
-chmod u-xs,g-xws,o-xwt /etc/chrony.keys
+chmod u-xs,g-xws,o-xwrt /etc/chrony.keys
 
 else
     >&2 echo 'Remediation is not applicable, nothing was done'

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys' differs.
--- xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys
+++ xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys
@@ -24,10 +24,10 @@
   - medium_severity
   - no_reboot_needed
 
-- name: Ensure permission u-xs,g-xws,o-xwt on /etc/chrony.keys
+- name: Ensure permission u-xs,g-xws,o-xwrt on /etc/chrony.keys
   file:
     path: /etc/chrony.keys
-    mode: u-xs,g-xws,o-xwt
+    mode: u-xs,g-xws,o-xwrt
   when:
   - '"kernel" in ansible_facts.packages'
   - file_exists.stat is defined and file_exists.stat.exists

Copy link

codeclimate bot commented Nov 5, 2024

Code Climate has analyzed commit fd88cd9 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 60.9% (0.0% change).

View more on Code Climate.

@jan-cerny jan-cerny added this to the 0.1.75 milestone Nov 6, 2024
@vojtapolasek
Copy link
Collaborator

Merging. Failing Automatus tests are not relevant to this PR.

@vojtapolasek vojtapolasek merged commit 9b736e5 into ComplianceAsCode:master Nov 6, 2024
103 of 105 checks passed
@Mab879 Mab879 deleted the fix_chrony2 branch November 6, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Update Rule Issues or pull requests related to Rules updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants