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 no_legacy_plus_entries_* Ansible Remedations #11027

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Aug 24, 2023

Description:

  • Move to multi platforms
  • Update Ansible remedations to fit the style guide

Rationale:

  • Style guide
  • Ansible parity

* Made the platform multi_platform_all
* Brought up to today's style guide
@Mab879 Mab879 added the Ansible Ansible remediation update. label Aug 24, 2023
@Mab879 Mab879 added this to the 0.1.70 milestone Aug 24, 2023
@github-actions
Copy link

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

@github-actions
Copy link

github-actions bot commented Aug 24, 2023

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

Click here to see the full diff
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_group' differs.
--- xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_group
+++ xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_group
@@ -1,5 +1,6 @@
-- name: Backup the old /etc/group file
-  copy:
+- name: Ensure there are no legacy + NIS entries in /etc/group - Backup the Old /etc/group
+    File
+  ansible.builtin.copy:
     src: /etc/group
     dest: /etc/group-
     remote_src: true
@@ -12,8 +13,9 @@
   - no_reboot_needed
   - restrict_strategy
 
-- name: Remove lines starting with + from /etc/group
-  lineinfile:
+- name: Ensure there are no legacy + NIS entries in /etc/group - Remove Lines Starting
+    with + From /etc/group
+  ansible.builtin.lineinfile:
     regexp: ^\+.*$
     state: absent
     path: /etc/group

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_passwd' differs.
--- xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_passwd
+++ xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_passwd
@@ -1,5 +1,6 @@
-- name: Backup the old /etc/passwd file
-  copy:
+- name: Ensure there are no legacy + NIS entries in /etc/passwd - Backup the Old /etc/passwd
+    File
+  ansible.builtin.copy:
     src: /etc/passwd
     dest: /etc/passwd-
     remote_src: true
@@ -12,8 +13,9 @@
   - no_reboot_needed
   - restrict_strategy
 
-- name: Remove lines starting with + from /etc/passwd
-  lineinfile:
+- name: Ensure there are no legacy + NIS entries in /etc/passwd - Remove Lines Starting
+    with + From /etc/passwd
+  ansible.builtin.lineinfile:
     regexp: ^\+.*$
     state: absent
     path: /etc/passwd

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_shadow' differs.
--- xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_shadow
+++ xccdf_org.ssgproject.content_rule_no_legacy_plus_entries_etc_shadow
@@ -1,5 +1,6 @@
-- name: Backup the old /etc/shadow file
-  copy:
+- name: Ensure there are no legacy + NIS entries in /etc/shadow - Backup the Old /etc/shadow
+    File
+  ansible.builtin.copy:
     src: /etc/shadow
     dest: /etc/shadow-
     remote_src: true
@@ -12,8 +13,9 @@
   - no_reboot_needed
   - restrict_strategy
 
-- name: Remove lines starting with + from /etc/shadow
-  lineinfile:
+- name: Ensure there are no legacy + NIS entries in /etc/shadow - Remove Lines Starting
+    with + From /etc/shadow
+  ansible.builtin.lineinfile:
     regexp: ^\+.*$
     state: absent
     path: /etc/shadow

@marcusburghardt marcusburghardt self-assigned this Aug 25, 2023
* Made the platform multi_platform_all
* Brought up to today's style guide
* Made the platform multi_platform_all
* Brought up to today's style guide
@Mab879 Mab879 force-pushed the update_no_legacy_plus_entries_ansbile branch from 111c2c8 to 0d2e0de Compare August 25, 2023 12:23
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

@codeclimate
Copy link

codeclimate bot commented Aug 25, 2023

Code Climate has analyzed commit 0d2e0de 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 53.3% (0.0% change).

View more on Code Climate.

@marcusburghardt marcusburghardt merged commit 80f6037 into ComplianceAsCode:master Aug 25, 2023
37 of 38 checks passed
@Mab879 Mab879 deleted the update_no_legacy_plus_entries_ansbile branch August 25, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ansible Ansible remediation update.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants