-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt sysctl template for use in oscap-bootc
OVAL check in sysctl template consists of 2 parts where the first part checks configuration and second checks the runtime status of the sysctl option. But, when building a bootable container image we face a problem that the runtime status doesn't make sense to check and can't be changed by the remediation. That causes the check after remediation fails and the rule result is error. Therefore, we need to suppress then runtime part of the check when building a bootable container image. Also, we shouldn't attempt to change runtime while building a bootable container image.
- Loading branch information
Showing
3 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<def-group> | ||
<definition class="inventory" id="oscap_bootc_env_var" version="2"> | ||
<metadata> | ||
<title>Check if the environment is execution of the oscap-bootc build tool in the podman build environment</title> | ||
<affected family="unix"> | ||
<platform>multi_platform_all</platform> | ||
</affected> | ||
<description>Check the value of environment variable OSCAP_BOOTC_BUILD.</description> | ||
<reference ref_id="cpe:/a:osbuild" source="CPE" /> | ||
</metadata> | ||
<criteria> | ||
<criterion comment="Check the value of OSCAP_BOOTC_BUILD variable" test_ref="test_oscap_bootc_env_var" /> | ||
</criteria> | ||
</definition> | ||
|
||
<ind:environmentvariable58_test check="all" check_existence="all_exist" | ||
comment="environment variable OSCAP_BOOTC_BUILD is set to bwrap-osbuild" | ||
id="test_oscap_bootc_env_var" version="1"> | ||
<ind:object object_ref="object_oscap_bootc_env_var" /> | ||
<ind:state state_ref="state_oscap_bootc_env_var" /> | ||
</ind:environmentvariable58_test> | ||
|
||
<ind:environmentvariable58_object | ||
id="object_oscap_bootc_env_var" version="1"> | ||
<ind:pid xsi:nil="true" datatype="int" /> | ||
<ind:name>OSCAP_BOOTC_BUILD</ind:name> | ||
</ind:environmentvariable58_object> | ||
|
||
<ind:environmentvariable58_state | ||
id="state_oscap_bootc_env_var" version="1"> | ||
<ind:value>YES</ind:value> | ||
</ind:environmentvariable58_state> | ||
</def-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters