-
Notifications
You must be signed in to change notification settings - Fork 706
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
Adapt sysctl template for bootable containers #12552
Conversation
Skipping CI for Draft Pull Request. |
/packit build |
8d62301
to
5237ec2
Compare
Add an SCE check to the sysctl template special for bootable containers. We don't want to use OVAL check in this template because the OVAL check checks runtime status using OpenSCAP sysctl probe. The probe doesn't return meaningful results during podman build process and also it doesn't make sense to check runtime during the build. We need to check only the static configuration. Moreover, we update the Bash remediation to not set the runtime status during podman build process. We need to update the test `test_xccdf_values_in_ds.sh`. Bash variables whose names start with `$XCCDF_VALUE_` are valid in SCE content. The `$XCCDF_VALUE_` variables are exported by `oscap` so that the SCE check can use XCCDF Values in its code.
The flags "S" and "R" are set in FLAGS variable always. Since they're set always, we don't have to set them at all. We can remove the conditions that check for these flags and always use the code inside the conditions.
In fact, the `FLAGS` variable only holds information about if the rule is related to IPv6 or not. So we can rename it to a better name `IPV6` and make it a boolean variable.
7386be5
to
e6e3371
Compare
I have rebased this PR on the top of the latest upstream master branch. Then, I have add support for multiple values in |
All occurrences of the sysctl settings must have the correct value. It isn't enough to have one correct entry to pass. If there are multiple entries and one of them has incorrect value we need to fail.
Code Climate has analyzed commit 257d257 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 60.9% (0.0% change). View more on Code Climate. |
b5456a8
into
ComplianceAsCode:master
Add an SCE check to the sysctl template special for bootable containers. We don't want to use OVAL check in this template because the OVAL check checks runtime status using OpenSCAP sysctl probe. The probe doesn't return meaningful results during podman build process and also it doesn't make sense to check runtime during the build. We need to check only the static configuration. Moreover, we update the Bash remediation to not set the runtime status during podman build process.