diff --git a/controls/SV-230279.rb b/controls/SV-230279.rb index 04be990..84025f7 100644 --- a/controls/SV-230279.rb +++ b/controls/SV-230279.rb @@ -44,17 +44,17 @@ tag nist: ['SC-3'] tag 'host' - only_if('This control is Not Applicable to containers', impact: 0.0) { - !virtualization.system.eql?('docker') + only_if("This control is Not Applicable to containers", impact: 0.0) { + !virtualization.system.eql?("docker") } - grub_stdout = command('grub2-editenv - list').stdout - setting = /slub_debug\s*=\s*P/ + grub_stdout = command("grub2-editenv - list").stdout + setting = /slub_debug\s*=\s*.*P.*/ - describe 'GRUB config' do - it 'should enable page poisoning' do - expect(parse_config(grub_stdout)['kernelopts']).to match(setting), 'Current GRUB configuration does not disable this setting' - expect(parse_config_file('/etc/default/grub')['GRUB_CMDLINE_LINUX']).to match(setting), 'Setting not configured to persist between kernel updates' + describe "GRUB config" do + it "should enable page poisoning" do + expect(parse_config(grub_stdout)["kernelopts"]).to match(setting), "Current GRUB configuration does not disable this setting" + expect(parse_config_file("/etc/default/grub")["GRUB_CMDLINE_LINUX"]).to match(setting), "Setting not configured to persist between kernel updates" end end -end +end \ No newline at end of file