-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
…r ENV dependent test
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,38 @@ | |
it { should_not be_installed } | ||
end | ||
end | ||
|
||
## can also be syslog-ng... | ||
control 'package-07' do | ||
impact 1.0 | ||
title 'Install rsyslog server' | ||
desc 'Syslog server is required to receive system and applications logs' | ||
describe package('rsyslog') do | ||
it { should be_installed } | ||
end | ||
end | ||
|
||
control 'package-08' do | ||
impact 1.0 | ||
title 'Install auditd' | ||
desc 'auditd provides extended logging capacities on recent distribution' | ||
describe package('auditd') do | ||
it { should be_installed } | ||
end | ||
describe auditd_conf do | ||
its('log_file') { should cmp '/var/log/audit/audit.log' } | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
juju4
Author
Contributor
|
||
its('log_format') { should cmp 'raw' } | ||
its('flush') { should cmp 'INCREMENTAL' } | ||
its('freq') { should cmp 20 } | ||
its('num_logs') { should cmp 5 } | ||
its('max_log_file') { should cmp 6 } | ||
its('max_log_file_action') { should cmp 'ROTATE' } | ||
its('space_left') { should cmp 75 } | ||
its('action_mail_acct') { should cmp 'root' } | ||
its('space_left_action') { should cmp 'SYSLOG' } | ||
its('admin_space_left') { should cmp 50 } | ||
its('admin_space_left_action') { should cmp 'SUSPEND' } | ||
its('disk_full_action') { should cmp 'SUSPEND' } | ||
its('disk_error_action') { should cmp 'SUSPEND' } | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,14 @@ | |
impact 1.0 | ||
title 'IPv4 Forwarding' | ||
desc "If you're not intending for your system to forward traffic between interfaces, or if you only have a single interface, the forwarding function must be disable." | ||
describe kernel_parameter('net.ipv4.ip_forward') do | ||
its(:value) { should eq 0 } | ||
end | ||
describe kernel_parameter('net.ipv4.conf.all.forwarding') do | ||
its(:value) { should eq 0 } | ||
end | ||
# unless defined? ENV['sysctl_forwarding'] | ||
describe kernel_parameter('net.ipv4.ip_forward') do | ||
its(:value) { should eq 0 } | ||
end | ||
describe kernel_parameter('net.ipv4.conf.all.forwarding') do | ||
its(:value) { should eq 0 } | ||
end | ||
# end | ||
end | ||
|
||
control 'sysctl-02' do | ||
|
@@ -317,11 +319,23 @@ | |
|
||
control 'sysctl-31' do | ||
impact 1.0 | ||
title 'Disable Core Dumps' | ||
desc 'Ensure that core dumps can never be made by setuid programs' | ||
title 'Secure Core Dumps' | ||
desc 'Ensure that core dumps can never be made by setuid programs or with fully qualified path' | ||
|
||
describe kernel_parameter('fs.suid_dumpable') do | ||
its(:value) { should eq 0 } | ||
# its(:value) { should eq 0 or should eq 2 } NOK | ||
# its(:value) { should match /[02]/ } NOK | ||
# its(:value) { should match /0|2/ } NOK | ||
its(:value) { should eq 2 } | ||
end | ||
# unless kernel_parameter('fs.suid_dumpable') == 2 | ||
# describe kernel_parameter('fs.suid_dumpable') do | ||
# its(:value) { should eq 2 } | ||
# end | ||
describe kernel_parameter('kernel.core_pattern') do | ||
its(:value) { should match /^\// } | ||
This comment has been minimized.
Sorry, something went wrong.
artem-sidorenko
Member
|
||
end | ||
# end | ||
end | ||
|
||
control 'sysctl-32' do | ||
|
@juju4 this is another part I have to fix, I hope you can help me here too. Can you tell me the source/guide/whatever for this settings of auditd? Or is it something from some base OS defaults?