CMP-4619: Fix-OpenSCAP rules for /etc/shadow return ERROR on RHCOS 10 - #15046
CMP-4619: Fix-OpenSCAP rules for /etc/shadow return ERROR on RHCOS 10#15046taimurhafeez wants to merge 1 commit into
Conversation
Mab879
left a comment
There was a problem hiding this comment.
These rules are shared by RHEL and I'm getting Automatus failures so we need investigate that before merging.
|
@Mab879 Where do you see the failures? |
|
@taimurhafeez OCP 4.22 has RHCOS 9 and it has the same permissions as RHCOS 10 and the rule works: Tried with CO 1.9.2 content, and your PR: |
|
/test e2e-aws-openshift-platform-compliance |
On locally ran Automatus tests. |
|
@taimurhafeez: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Sorry, I was testing the wrong rules. The fix works for RHCOS 10. |
The error I saw is no longer happening, dismissing my review.
Description:
no_empty_passwords_etc_shadow,no_legacy_plus_entries_etc_shadow) that check/etc/shadowreturn ERROR on RHCOS 10 because thetextfilecontent54probe cannot read the file —/etc/shadowhas 0000 permissions on RHEL 10.ind:textfilecontent54(direct file I/O) to unix:shadow (C library shadow API viagetspent()), which does not require direct file read access.no_password_auth_for_systemaccounts,accounts_password_all_shadowed_sha512,accounts_password_last_change_is_in_past).unix:shadowprobe is available on all supported platforms (RHEL 8/9/10).Rationale:
Review Hints:
Verified on OCP 5.0.0-0.nightly-2026-08-21-033959 (RHCOS 10.2, 3 masters + 3 workers) with CO 1.9.2.
To verify manually on a node:
oc debug node/<name> -- chroot /host bash -c 'awk -F: "!length(\$2) {print \$1}" /etc/shadow && grep "^\+" /etc/shadow'— empty output confirms compliance.Co-authored with Claude