We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b424ca commit 8ca6e27Copy full SHA for 8ca6e27
1 file changed
controls/sshd_spec.rb
@@ -525,8 +525,8 @@
525
impact 1.0
526
title 'Server: RSA HostKey size'
527
desc 'Verifies if RSA HostKey size >= 4096'
528
- only_if('RSA HostKey exists') do
529
- file("#{sshd_custom_hostkeys_path}/ssh_host_rsa_key").exists?
+ only_if('RSA HostKey is readable') do
+ File.readable?("#{sshd_custom_hostkeys_path}/ssh_host_rsa_key")
530
end
531
532
describe bash("test $(ssh-keygen -l -f #{sshd_custom_hostkeys_path}/ssh_host_rsa_key | awk '$1 < 4096 { print $1 }' | wc -l) -eq 0") do
0 commit comments