-
Notifications
You must be signed in to change notification settings - Fork 717
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
[Stabilization] Fix tests for sudo require authentication stable #11316
[Stabilization] Fix tests for sudo require authentication stable #11316
Conversation
!authenticate is not valid in group line in sudoers
This datastream diff is auto generated by the check Click here to see the full diffansible remediation for rule 'xccdf_org.ssgproject.content_rule_sudo_remove_no_authenticate' differs.
--- xccdf_org.ssgproject.content_rule_sudo_remove_no_authenticate
+++ xccdf_org.ssgproject.content_rule_sudo_remove_no_authenticate
@@ -1,5 +1,5 @@
- name: Find /etc/sudoers.d/ files
- find:
+ ansible.builtin.find:
paths:
- /etc/sudoers.d/
register: sudoers
@@ -16,7 +16,7 @@
- sudo_remove_no_authenticate
- name: Remove lines containing !authenticate from sudoers files
- replace:
+ ansible.builtin.replace:
regexp: (^(?!#).*[\s]+\!authenticate.*$)
replace: '# \g<1>'
path: '{{ item.path }}'
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_sudo_remove_nopasswd' differs.
--- xccdf_org.ssgproject.content_rule_sudo_remove_nopasswd
+++ xccdf_org.ssgproject.content_rule_sudo_remove_nopasswd
@@ -1,5 +1,5 @@
- name: Find /etc/sudoers.d/ files
- find:
+ ansible.builtin.find:
paths:
- /etc/sudoers.d/
register: sudoers
@@ -16,7 +16,7 @@
- sudo_remove_nopasswd
- name: Remove lines containing NOPASSWD from sudoers files
- replace:
+ ansible.builtin.replace:
regexp: (^(?!#).*[\s]+NOPASSWD[\s]*\:.*$)
replace: '# \g<1>'
path: '{{ item.path }}'
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_sudo_require_authentication' differs.
--- xccdf_org.ssgproject.content_rule_sudo_require_authentication
+++ xccdf_org.ssgproject.content_rule_sudo_require_authentication
@@ -1,5 +1,5 @@
- name: Find /etc/sudoers.d/ files
- find:
+ ansible.builtin.find:
paths:
- /etc/sudoers.d/
register: sudoers
@@ -16,7 +16,7 @@
- sudo_require_authentication
- name: Remove lines containing NOPASSWD from sudoers files
- replace:
+ ansible.builtin.replace:
regexp: (^(?!#).*[\s]+NOPASSWD[\s]*\:.*$)
replace: '# \g<1>'
path: '{{ item.path }}'
@@ -37,7 +37,7 @@
- sudo_require_authentication
- name: Find /etc/sudoers.d/ files
- find:
+ ansible.builtin.find:
paths:
- /etc/sudoers.d/
register: sudoers
@@ -54,7 +54,7 @@
- sudo_require_authentication
- name: Remove lines containing !authenticate from sudoers files
- replace:
+ ansible.builtin.replace:
regexp: (^(?!#).*[\s]+\!authenticate.*$)
replace: '# \g<1>'
path: '{{ item.path }}' |
Code Climate has analyzed commit 70e64a6 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 58.5%. View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you.
I am waiving failing Automatus tests. There is no visudo in containers, I verified it works on local VM. |
|
Backport #11315