Skip to content

Commit

Permalink
Merge pull request #67 from tsenart/master
Browse files Browse the repository at this point in the history
Test server config for Banner and DebianBanner
  • Loading branch information
atomic111 authored Oct 24, 2016
2 parents e6f2426 + f4e1cff commit 75754b9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions controls/sshd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,28 @@
its('PrintLastLog') { should eq('no') }
end
end

control 'sshd-46' do
impact 1.0
title 'Server: Banner'
desc 'Specifies a banner file to serve before authentication succeeds'
describe sshd_config do
its('Banner') { should eq('none') }
end
end

control 'sshd-47' do
impact 1.0
title 'Server: DebianBanner'
desc 'Specifies whether to include OS distribution in version information'
case os[:family]
when 'debian' then
describe sshd_config do
its('DebianBanner') { should eq('no') }
end
else
describe file(sshd_config.path) do
its('content') { should_not match(/DebianBanner/) }
end
end
end

0 comments on commit 75754b9

Please sign in to comment.