We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 09a182b + 9f4f071 commit 0d4644eCopy full SHA for 0d4644e
1 file changed
controls/sysctl_spec.rb
@@ -432,3 +432,14 @@
432
its(:value) { should eq 1 }
433
end
434
435
+
436
+control 'sysctl-35' do
437
+ impact 1.0
438
+ title 'Restrict ptrace attach to privileged users'
439
+ desc 'Ensure kernel.yama.ptrace_scope is set to at least 2 so unprivileged users cannot attach ptrace to arbitrary processes.'
440
+ # exclude SuSE because it does not have this parameter
441
+ only_if { !(container_execution || os.suse?) }
442
+ describe kernel_parameter('kernel.yama.ptrace_scope') do
443
+ its(:value) { should >= 2 }
444
+ end
445
+end
0 commit comments