Skip to content

Commit

Permalink
SV-257791
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmetzger committed Oct 13, 2023
1 parent 297d43b commit f1976b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controls/SV-257791.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
desc 'The " /boot/grub2/grub.cfg" file stores sensitive system configuration. Protection of this file is critical for system security.'
desc 'check', 'Verify the ownership of the "/boot/grub2/grub.cfg" file with the following command:
$ sudo stat -c "%U %n" /boot/grub2/grub.cfg
$ sudo stat -c "%U %n" /boot/grub2/grub.cfg
root /boot/grub2/grub.cfg
root /boot/grub2/grub.cfg
If "/boot/grub2/grub.cfg" file does not have an owner of "root", this is a finding.'
desc 'fix', 'Change the owner of the file /boot/grub2/grub.cfg to root by running the following command:
Expand All @@ -23,4 +23,8 @@
tag 'documentable'
tag cci: ['CCI-000366']
tag nist: ['CM-6 b']

describe file('/boot/grub2/grub.cfg') do
its('owner') { should eq 'root' }
end
end

0 comments on commit f1976b3

Please sign in to comment.