Change directory_permissions_etc_iptables to 700#12384
Merged
marcusburghardt merged 1 commit intoSep 18, 2024
Merged
Conversation
|
This datastream diff is auto generated by the check Click here to see the full diffNew content has different text for rule 'xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables'.
--- xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables
+++ xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables
@@ -3,7 +3,7 @@
Verify Permissions On /etc/iptables Directory
[description]:
-To properly set the permissions of /etc/iptables, run the command: $ sudo chmod 0600 /etc/iptables
+To properly set the permissions of /etc/iptables, run the command: $ sudo chmod 0700 /etc/iptables
[reference]:
R50
OCIL for rule 'xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables' differs.
--- ocil:ssg-directory_permissions_etc_iptables_ocil:questionnaire:1
+++ ocil:ssg-directory_permissions_etc_iptables_ocil:questionnaire:1
@@ -2,6 +2,6 @@
run the command:
$ ls -l /etc/iptables
If properly configured, the output should indicate the following permissions:
-0600
- Is it the case that /etc/iptables does not have unix mode 0600?
+0700
+ Is it the case that /etc/iptables does not have unix mode 0700?
bash remediation for rule 'xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables' differs.
--- xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables
+++ xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables
@@ -1,7 +1,7 @@
# Remediation is applicable only in certain platforms
if rpm --quiet -q iptables; then
-find -H /etc/iptables/ -maxdepth 1 -perm /u+xs,g+xwrs,o+xwrt -type d -exec chmod u-xs,g-xwrs,o-xwrt {} \;
+find -H /etc/iptables/ -maxdepth 1 -perm /u+s,g+xwrs,o+xwrt -type d -exec chmod u-s,g-xwrs,o-xwrt {} \;
else
>&2 echo 'Remediation is not applicable, nothing was done'
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables' differs.
--- xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables
+++ xccdf_org.ssgproject.content_rule_directory_permissions_etc_iptables
@@ -11,7 +11,7 @@
- no_reboot_needed
- name: Find /etc/iptables/ file(s)
- command: 'find -H /etc/iptables/ -maxdepth 1 -perm /u+xs,g+xwrs,o+xwrt -type d '
+ command: 'find -H /etc/iptables/ -maxdepth 1 -perm /u+s,g+xwrs,o+xwrt -type d '
register: files_found
changed_when: false
failed_when: false
@@ -29,7 +29,7 @@
- name: Set permissions for /etc/iptables/ file(s)
file:
path: '{{ item }}'
- mode: u-xs,g-xwrs,o-xwrt
+ mode: u-s,g-xwrs,o-xwrt
state: directory
with_items:
- '{{ files_found.stdout_lines }}' |
|
Change in Ansible Please consider using more suitable Ansible module than |
|
Code Climate has analyzed commit 14177a6 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 59.5% (0.0% change). View more on Code Climate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Change directory_permissions_etc_iptables to 0700
Rationale:
Directories need exec.