Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test server config for Banner and DebianBanner #67

Merged
merged 1 commit into from
Oct 24, 2016
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
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