Skip to content

Drop unneeded sudo in bash remediation#14396

Draft
teacup-on-rockingchair wants to merge 1 commit intoComplianceAsCode:masterfrom
teacup-on-rockingchair:remove_sudo_bash_remediations_no_empty_passwords_etc_shadow
Draft

Drop unneeded sudo in bash remediation#14396
teacup-on-rockingchair wants to merge 1 commit intoComplianceAsCode:masterfrom
teacup-on-rockingchair:remove_sudo_bash_remediations_no_empty_passwords_etc_shadow

Conversation

@teacup-on-rockingchair
Copy link
Contributor

Description:

  • Cleanup bash remediation code

Rationale:

  • Drop unneeded sudo in remediation. THe remediation is assumed to be executed in privileged mode

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Feb 14, 2026
@openshift-ci
Copy link

openshift-ci bot commented Feb 14, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions
Copy link

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

Click here to see the full diff
bash remediation for rule 'xccdf_org.ssgproject.content_rule_no_empty_passwords_etc_shadow' differs.
--- xccdf_org.ssgproject.content_rule_no_empty_passwords_etc_shadow
+++ xccdf_org.ssgproject.content_rule_no_empty_passwords_etc_shadow
@@ -1,7 +1,7 @@
 # Remediation is applicable only in certain platforms
 if rpm --quiet -q kernel-core; then
 
-readarray -t users_with_empty_pass < <(sudo awk -F: '!$2 {print $1}' /etc/shadow)
+readarray -t users_with_empty_pass < <(awk -F: '!$2 {print $1}' /etc/shadow)
 
 for user_with_empty_pass in "${users_with_empty_pass[@]}"
 do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Used by openshift-ci bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant