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

New sysctl fs parameters #8304

Merged
merged 2 commits into from
Mar 10, 2022
Merged

Conversation

marcusburghardt
Copy link
Member

Since kernel 4.19, new parameters were introduced to permit a better access control to regular files and FIFOs.
This PR adds two new rules for these parameters.

@openshift-ci openshift-ci bot added the needs-rebase Used by openshift-ci bot. label Mar 7, 2022
New parameter available on kernel > 4.19
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

Start a new ephemeral environment with changes proposed in this pull request:

Open in Gitpod

@openshift-ci openshift-ci bot removed the needs-rebase Used by openshift-ci bot. label Mar 7, 2022
@marcusburghardt marcusburghardt added New Rule Issues or pull requests related to new Rules. RHEL9 Red Hat Enterprise Linux 9 product related. do-not-merge/work-in-progress Used by openshift-ci bot. labels Mar 7, 2022
@marcusburghardt
Copy link
Member Author

I have to investigate why the sysctl_fs_protected_fifo rule is resulting in notchecked, but the sysctl_fs_protected_regular is fine.

New parameter available on kernel > 4.19
@marcusburghardt
Copy link
Member Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Mar 9, 2022

@marcusburghardt: 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/e2e-aws-rhcos4-moderate fac6bed link true /test e2e-aws-rhcos4-moderate

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/test-infra repository. I understand the commands that are listed here.

Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

[jcerny@thinkpad scap-security-guide{pr/8304}]$ python3 tests/test_suite.py rule --libvirt qemu:///system ssgts_rhel9 sysctl_fs_protected_fifos sysctl_fs_protected_regular
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2022-03-10-1033/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_sysctl_fs_protected_fifos
INFO - Script expected_value.pass.sh using profile (all) OK
INFO - Script missing_parameter.fail.sh using profile (all) OK
INFO - Script unexpected_value.fail.sh using profile (all) OK
[jcerny@thinkpad scap-security-guide{pr/8304}]$ python3 tests/test_suite.py rule --libvirt qemu:///system ssgts_rhel9 sysctl_fs_protected_regular
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2022-03-10-1035/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_sysctl_fs_protected_regular
INFO - Script expected_value.pass.sh using profile (all) OK
INFO - Script missing_parameter.fail.sh using profile (all) OK
INFO - Script unexpected_value.fail.sh using profile (all) OK

{{% endif %}}
<criteria operator="AND">
<extend_definition comment="{{{ SYSCTLVAR }}} configuration setting check" definition_ref="sysctl_static_{{{ SYSCTLID }}}" />
<extend_definition comment="{{{ SYSCTLVAR }}} runtime setting check" definition_ref="sysctl_runtime_{{{ SYSCTLID }}}" />
<extend_definition comment="{{{ SYSCTLVAR }}} configuration setting check"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We usually don't do changes just because of formatting or whitespace.

@jan-cerny jan-cerny merged commit ec151bb into ComplianceAsCode:master Mar 10, 2022
@jan-cerny jan-cerny added this to the 0.1.61 milestone Mar 10, 2022
@marcusburghardt marcusburghardt deleted the sysctl_fs branch December 5, 2022 08:09
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Rule Issues or pull requests related to new Rules. RHEL9 Red Hat Enterprise Linux 9 product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants