Skip to content

Drop unneeded sudo in bash remediation#14396

Merged
Mab879 merged 1 commit intoComplianceAsCode:masterfrom
teacup-on-rockingchair:remove_sudo_bash_remediations_no_empty_passwords_etc_shadow
Feb 16, 2026
Merged

Drop unneeded sudo in bash remediation#14396
Mab879 merged 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

@teacup-on-rockingchair teacup-on-rockingchair added this to the 0.1.80 milestone Feb 15, 2026
@teacup-on-rockingchair teacup-on-rockingchair added the Bash Bash remediation update. label Feb 15, 2026
@teacup-on-rockingchair teacup-on-rockingchair marked this pull request as ready for review February 15, 2026 08:20
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Feb 15, 2026
@Mab879 Mab879 self-assigned this Feb 16, 2026
@Mab879 Mab879 merged commit ce1651b into ComplianceAsCode:master Feb 16, 2026
142 of 143 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bash Bash remediation update.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants