Skip to content

Commit 6563cb3

Browse files
authored
Merge pull request #62 from artem-sidorenko/kernel-modules
Allow verification if kernel modules loading is disabled
2 parents a493413 + deb96a6 commit 6563cb3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

controls/sysctl_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# author: Patrick Muench
1919

2020
sysctl_forwarding = attribute('sysctl_forwarding', default: false, description: 'Is network forwarding needed?')
21+
kernel_modules_disabled = attribute('kernel_modules_disabled', default: 0, description: 'Should loading of kernel modules be disabled?')
2122

2223
control 'sysctl-01' do
2324
impact 1.0
@@ -304,7 +305,7 @@
304305
title 'Disable loading kernel modules'
305306
desc 'The sysctl key kernel.modules_disabled is very straightforward. If it contains a "1" it will disable loading new modules, where a "0" will still allow loading them. Using this option will be a great protection against loading malicious kernel modules.'
306307
describe kernel_parameter('kernel.modules_disabled') do
307-
its(:value) { should eq 0 }
308+
its(:value) { should eq kernel_modules_disabled }
308309
end
309310
end
310311

0 commit comments

Comments
 (0)