Skip to content

Commit

Permalink
slub debug implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
DMedina6 committed Jul 10, 2024
1 parent f026202 commit 82f7ecc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions controls/SV-230279.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 82f7ecc

Please sign in to comment.