Skip to content

Commit da8aab0

Browse files
Merge pull request #176 from schurzi/crypto_policy
add control for CRYPTO_POLICY on RedHat
2 parents e182740 + 893eeb4 commit da8aab0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

controls/sshd_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,3 +503,19 @@
503503
its('stderr') { should eq '' }
504504
end
505505
end
506+
507+
control 'sshd-49' do
508+
impact 1.0
509+
title 'Server: CRYPTO_POLICY'
510+
desc 'Verifies, that we are not running CRYPTO_POLICY and our settings from sshd_config are effective'
511+
only_if('OS is RHEL 8+ or compatible') do
512+
os[:family] == 'redhat' && ::Gem::Version.new(os.release) > ::Gem::Version.new('8')
513+
end
514+
515+
describe bash("pgrep -af 'sshd -D'") do
516+
its('exit_status') { should eq 0 }
517+
its('stdout') { should_not match('-oCiphers') }
518+
its('stdout') { should_not match('-oKexAlgorithms') }
519+
its('stdout') { should_not match('-oHostKeyAlgorithms') }
520+
end
521+
end

0 commit comments

Comments
 (0)