Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions controls/sysctl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,14 @@
its(:value) { should eq 1 }
end
end

control 'sysctl-35' do
impact 1.0
title 'Restrict ptrace attach to privileged users'
desc 'Ensure kernel.yama.ptrace_scope is set to at least 2 so unprivileged users cannot attach ptrace to arbitrary processes.'
# exclude SuSE because it does not have this parameter
only_if { !(container_execution || os.suse?) }
describe kernel_parameter('kernel.yama.ptrace_scope') do
its(:value) { should >= 2 }
end
end