Skip to content
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

Pass OSCAP_BOOTC_BUILD to remediations #2170

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

jan-cerny
Copy link
Member

Starting with this commit, the OSCAP_BOOTC_BUILD environment variable will be passed down to the bash remediation. If this environment variable is set in the caller environment, the Bash remediations will be able to access it and read its value. This will be useful because the bash remediations will be able to contain a condition depending on this variable. Using this feature we can influence the behavior of our Bash remediations in the process of building bootable container images. The oscap-bootc utility will export the OSCAP_BOOTC_BUILD environment variable and the Bash remeditions will check this variable and for example they will not start systemd services.

This commit also adds a small test.

@jan-cerny jan-cerny added the Image Mode Bootable containers and Image Mode RHEL label Oct 22, 2024
@jan-cerny jan-cerny added this to the 1.3.11 milestone Oct 22, 2024
@jan-cerny
Copy link
Member Author

I have rebased this PR on the top of the latest upstream maint-1.3 branch.

@matusmarhefka matusmarhefka self-assigned this Oct 23, 2024
Starting with this commit, the OSCAP_BOOTC_BUILD environment variable
will be passed down to the bash remediation. If this environment
variable is set in the caller environment, the Bash remediations will be
able to access it and read its value. This will be useful because the
bash remediations will be able to contain a condition depending on this
variable. Using this feature we can influence the behavior of our Bash
remediations in the process of building bootable container images. The
`oscap-bootc` utility will export the `OSCAP_BOOTC_BUILD` environment
variable and the Bash remeditions will check this variable and for
example they will not start systemd services.

This commit also adds a small test.
@jan-cerny
Copy link
Member Author

I have rebased this PR on the top of the latest upstream maint-1.3 branch.

@matusmarhefka matusmarhefka merged commit 298d612 into OpenSCAP:maint-1.3 Oct 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Image Mode Bootable containers and Image Mode RHEL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants