fix: Set mode for bootloader user and grub conf files to 0600#220
Conversation
|
[citest] |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
==========================================
+ Coverage 78.43% 79.94% +1.51%
==========================================
Files 2 3 +1
Lines 255 344 +89
==========================================
+ Hits 200 275 +75
- Misses 55 69 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughChangesBootloader permission modes
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[citest] |
|
newer Fedora use 0664 for default grub that's why the test fails, will fix it |
|
[citest] |
|
[citest] |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/tests_add_rm.yml`:
- Around line 139-143: Guard both cleanup tasks in the always section, including
“Restore the original default kernel” and the corresponding removal task, with a
condition requiring __default_kernel and __default_kernel.kernel to be defined
before templating or using the value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 47fb729e-975f-436a-a0f9-8f9089afb102
📒 Files selected for processing (4)
tasks/main.ymltests/tests_add_rm.ymltests/tests_password.ymlvars/main.yml
🚧 Files skipped from review as they are similar to previous changes (3)
- tasks/main.yml
- tests/tests_password.yml
- vars/main.yml
|
[citest] |
* Due to CIS Benchmark 1.4.2 Ensure access to bootloader config is configured, mode of grub config files should be 0600. Default grub config doesn't fall under this benchmark, it's default mode is 0644. CIS Benchmar PDF is available upon registering at https://www.cisecurity.org/cis-benchmarks * Add test to verify that the mode is set correctly
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/tests_add_rm.yml`:
- Around line 140-146: Add the `tests::cleanup` tag to the cleanup tasks around
`__default_kernel`, including the “Restore the original default kernel” task and
the following cloned-kernel removal task, so debug runs can skip both cleanup
operations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d51ad9dd-7b57-4c09-9e20-e35928457eec
📒 Files selected for processing (4)
tasks/main.ymltests/tests_add_rm.ymltests/tests_password.ymlvars/main.yml
🚧 Files skipped from review as they are similar to previous changes (3)
- tests/tests_password.yml
- tasks/main.yml
- vars/main.yml
|
[citest] |
|
[citest] |
Enhancement: Set mode for bootloader user and grub conf files to 0600
Reason: Due to CIS Benchmark
1.4.2 Ensure access to bootloader config is configured, mode of grub config files should be0600. Default grub config doesn't fall under this benchmark, its default mode is 0644. CIS Benchmar PDF is available upon registering at https://www.cisecurity.org/cis-benchmarksResult: The mode of grub conf and user conf is set to 0600
Issue Tracker Tickets (Jira or BZ if any): https://redhat.atlassian.net/browse/RHEL-184795
Summary by CodeRabbit