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

bloodhound: Fix journal file permission check #3547

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

stmcginnis
Copy link
Contributor

Issue number:

Closes #3546

Description of changes:

The Bottlerocket CIS check 4.1.2 would correctly report if there was a failing condition, but it missed changing the result from SKIP to PASS if there was no failure.

This updates the result for 4.1.2 so that it will correctly report success as long as there are no non-compliant journal file permissions.

Testing done:

Ran Bottlerocket CIS compliance report and verified 4.1.2 correctly report PASS:

[ssm-user@control]$ apiclient report cis
Benchmark name:  CIS Bottlerocket Benchmark
Version:         v1.0.0
Reference:       https://www.cisecurity.org/benchmark/bottlerocket
Benchmark level: 1
Start time:      2023-10-23T16:41:44.527568759Z

[SKIP] 1.2.1     Ensure software update repositories are configured (Manual)
[PASS] 1.3.1     Ensure dm-verity is configured (Automatic)
[PASS] 1.4.1     Ensure setuid programs do not create core dumps (Automatic)
[PASS] 1.4.2     Ensure address space layout randomization (ASLR) is enabled (Automatic)
[PASS] 1.4.3     Ensure unprivileged eBPF is disabled (Automatic)
[PASS] 1.5.1     Ensure SELinux is configured (Automatic)
[SKIP] 1.6       Ensure updates, patches, and additional security software are installed (Manual)
[PASS] 2.1.1.1   Ensure chrony is configured (Automatic)
[PASS] 3.2.5     Ensure broadcast ICMP requests are ignored (Automatic)
[PASS] 3.2.6     Ensure bogus ICMP responses are ignored (Automatic)
[PASS] 3.2.7     Ensure TCP SYN Cookies is enabled (Automatic)
[SKIP] 3.4.1.3   Ensure IPv4 outbound and established connections are configured (Manual)
[SKIP] 3.4.2.3   Ensure IPv6 outbound and established connections are configured (Manual)
[PASS] 4.1.1.1   Ensure journald is configured to write logs to persistent disk (Automatic)
[PASS] 4.1.2     Ensure permissions on journal files are configured (Automatic)

Passed:          11
Failed:          0
Skipped:         4
Total checks:    15

Compliance check result: PASS

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

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

Do we need both assignments, or just the one when the struct is created?

The Bottlerocket CIS check 4.1.2 would correctly report if there was a
failing condition, but it missed changing the result from SKIP to PASS
if there was no failure.

This updates the result for 4.1.2 so that it will correctly report
success as long as there are no non-compliant journal file permissions.

Signed-off-by: Sean McGinnis <stmcg@amazon.com>
@stmcginnis
Copy link
Contributor Author

Apparently got distracted while finalizing things. Cleaned up the commit contents and repushed.

@stmcginnis stmcginnis merged commit 066e0be into bottlerocket-os:develop Oct 23, 2023
46 checks passed
@stmcginnis stmcginnis deleted the cis-journal-perms branch October 23, 2023 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

journal file permissions check is marked as SKIP in CIS report
3 participants