-
Notifications
You must be signed in to change notification settings - Fork 761
Add rules for access to all files under /boot/grub2
#14199
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
Open
Mab879
wants to merge
1
commit into
ComplianceAsCode:master
Choose a base branch
from
Mab879:add_grub2_access_rules
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+93
−32
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
25 changes: 25 additions & 0 deletions
25
linux_os/guide/system/bootloader-grub2/file_groupowner_boot_grub2/rule.yml
This file contains hidden or 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,25 @@ | ||
| documentation_complete: true | ||
|
|
||
| title: 'All GRUB configuration files must be group-owned by root' | ||
|
|
||
| description: |- | ||
| The files in <tt>{{{ grub2_uefi_boot_path }}}</tt> should | ||
| be group-owned by the <tt>root</tt> group to prevent | ||
| destruction or modification of the file. | ||
| {{{ describe_file_group_owner(file=grub2_uefi_boot_path, group="root") }}} | ||
|
|
||
| rationale: |- | ||
| The <tt>root</tt> group is a highly-privileged group. Furthermore, the group-owner of this | ||
| file should not have any access privileges anyway. | ||
|
|
||
| severity: unknown | ||
|
|
||
| identifiers: | ||
| cce@rhel10: CCE-89940-1 | ||
|
|
||
| template: | ||
| name: file_groupowner | ||
| vars: | ||
| filepath: {{{ grub2_uefi_boot_path }}}/ | ||
| gid_or_name: '0' | ||
| file_regex: ^.*$ |
24 changes: 24 additions & 0 deletions
24
linux_os/guide/system/bootloader-grub2/file_owner_boot_grub2/rule.yml
This file contains hidden or 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,24 @@ | ||
| documentation_complete: true | ||
|
|
||
| title: 'All GRUB configuration files must be owned by root' | ||
|
|
||
| description: |- | ||
| The files in <tt>{{{ grub2_uefi_boot_path }}}/grub.cfg</tt> should | ||
| be owned by the <tt>root</tt> user to prevent | ||
| destruction or modification of the file. | ||
| {{{ describe_file_owner(file=grub2_uefi_boot_path, owner="root") }}} | ||
|
|
||
| rationale: |- | ||
| To prevent unauthorized access and modifications to boot configuration. | ||
|
|
||
| severity: unknown | ||
|
|
||
| identifiers: | ||
| cce@rhel10: CCE-89088-9 | ||
|
|
||
| template: | ||
| name: file_owner | ||
| vars: | ||
| filepath: {{{ grub2_uefi_boot_path }}}/ | ||
| uid_or_name: '0' | ||
| file_regex: ^.*$ | ||
25 changes: 25 additions & 0 deletions
25
linux_os/guide/system/bootloader-grub2/file_permissions_boot_grub2/rule.yml
This file contains hidden or 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,25 @@ | ||
| documentation_complete: true | ||
|
|
||
| title: 'All GRUB configuration files must have mode 0600 or more restrictive' | ||
|
|
||
| description: |- | ||
| The files in <tt>{{{ grub2_uefi_boot_path }}}</tt> should | ||
| have mode <tt>0600</tt> to prevent | ||
| destruction or modification of the file. | ||
| {{{ describe_file_permissions(file=grub2_uefi_boot_path, perms="0600") }}} | ||
|
|
||
| rationale: |- | ||
| The file mode 0600 prevents unauthorized access and modifications to boot settings. | ||
|
|
||
| severity: unknown | ||
|
|
||
| identifiers: | ||
| cce@rhel10: CCE-90556-2 | ||
|
|
||
| template: | ||
| name: file_permissions | ||
| vars: | ||
| filepath: {{{ grub2_uefi_boot_path }}}/ | ||
| filemode: '0600' | ||
| allow_stricter_permissions: "true" | ||
| file_regex: ^.*$ |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.