Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jan-cerny
Copy link
Collaborator

@jan-cerny jan-cerny commented Jun 30, 2025

Use full path for some commands in /usr/sbin in Bash remediations.

This is a workaround for OpenSCAP issue:
OpenSCAP/openscap#2242
A proper fix would be in OpenSCAP, but it's less likely to update OpenSCAP in downstream than to update the content.

Effectively, this change will fix some rules that fail when building a hardened bootable container image:
#13550 #13551 #13552

In future, this problem will be smaller, because starting from Fedora 42, /usr/sbin is a symlink to /usr/bin, see: https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

Use full path for some commands in /usr/sbin in Bash
remediations.

This is a workaround for OpenSCAP issue:
OpenSCAP/openscap#2242
A proper fix would be in OpenSCAP, but it's less likely
to update OpenSCAP in downstream than to update the content.

Effectively, this change will fix some rules that fail when
building a hardened bootable container image:
ComplianceAsCode#13550
ComplianceAsCode#13551
ComplianceAsCode#13552

In future, this problem will be smaller, because starting from
Fedora 42, /usr/sbin is a symlink to /usr/bin, see:
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
@jan-cerny jan-cerny added this to the 0.1.78 milestone Jun 30, 2025
@jan-cerny jan-cerny added Bash Bash remediation update. Image Mode Bootable containers and Image Mode RHEL labels Jun 30, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Jun 30, 2025
Copy link

openshift-ci bot commented Jun 30, 2025

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

Copy link

Code Climate has analyzed commit b3a383d 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 61.9% (0.0% change).

View more on Code Climate.

@jan-cerny jan-cerny marked this pull request as ready for review June 30, 2025 09:15
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Jun 30, 2025
Copy link

openshift-ci bot commented Jun 30, 2025

@jan-cerny: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.13-images b3a383d link true /test 4.13-images

Full PR test history. Your PR dashboard.

Instructions 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.

@jan-cerny
Copy link
Collaborator Author

/retest

Copy link
Member

@evgenyz evgenyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@evgenyz evgenyz merged commit 833d79b into ComplianceAsCode:master Jul 6, 2025
129 of 131 checks passed
jan-cerny added a commit to jan-cerny/contest that referenced this pull request Jul 14, 2025
The issue ComplianceAsCode/content#13550 is
closed. It has been fixed or worked around by
ComplianceAsCode/content#13645. As of
2025-07-14, the issue doesn't appear in daily productization. Also, I
can't reproduce it locally using autocontest. I used current upstream
master as of HEAD f78aeca. In the HTML report, all 3 rules listed in the
description are passing. They pass both on RHEL 9 and 10.
matusmarhefka pushed a commit to RHSecurityCompliance/contest that referenced this pull request Jul 14, 2025
The issue ComplianceAsCode/content#13550 is
closed. It has been fixed or worked around by
ComplianceAsCode/content#13645. As of
2025-07-14, the issue doesn't appear in daily productization. Also, I
can't reproduce it locally using autocontest. I used current upstream
master as of HEAD f78aeca. In the HTML report, all 3 rules listed in the
description are passing. They pass both on RHEL 9 and 10.
jan-cerny added a commit to jan-cerny/contest that referenced this pull request Jul 14, 2025
Issues ComplianceAsCode/content#13551 and
ComplianceAsCode/content#13551 have been
closed. They have been fixed or worked around by
ComplianceAsCode/content#13645. As of
2025-07-14, these issues don't appear in daily productization. Also,
I can't reproduce them locally using autocontest. I used current upstream
master as of HEAD f78aeca. In the HTML reports they pass on both RHEL 9
and RHEL 10.
matusmarhefka pushed a commit to RHSecurityCompliance/contest that referenced this pull request Jul 14, 2025
Issues ComplianceAsCode/content#13551 and
ComplianceAsCode/content#13551 have been
closed. They have been fixed or worked around by
ComplianceAsCode/content#13645. As of
2025-07-14, these issues don't appear in daily productization. Also,
I can't reproduce them locally using autocontest. I used current upstream
master as of HEAD f78aeca. In the HTML reports they pass on both RHEL 9
and RHEL 10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bash Bash remediation update. Image Mode Bootable containers and Image Mode RHEL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants