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

WIP: Support TLS1.3 #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 10 additions & 4 deletions controls/ssl_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
description: 'The profile should not check if SSL is enabled on every port and assume it is'
)

tls_version = attribute(
'tls_version',
value: 'tls1.2',
description: 'The current TLS version to check (currently tls1.2 and tls1.3)'
)

# Find all TCP ports on the system, IPv4 and IPv6
# Eliminate duplicate ports for cleaner reporting and faster scans and sort the
# array by port number.
Expand Down Expand Up @@ -84,7 +90,7 @@

#######################################################
# Protocol Tests #
# Valid protocols are: tls1.2 #
# Valid protocols are: tls1.2, tls1.3 #
# Invalid protocols are : ssl2, ssl3, tls1.0, tls1.1 #
#######################################################
control 'ssl2' do
Expand Down Expand Up @@ -147,15 +153,15 @@
end
end

control 'tls1.2' do
title 'Enable TLS 1.2 on exposed ports.'
control 'tls1.2-1.3' do
title 'Enable TLS 1.2 or TLS 1.3 on exposed ports.'
impact 0.5
only_if { sslports.length > 0 }

sslports.each do |sslport|
# create a description
proc_desc = "on node == #{target_hostname} running #{sslport[:socket].process.inspect} (#{sslport[:socket].pid})"
describe ssl(sslport).protocols('tls1.2') do
describe ssl(sslport).protocols(tls_version) do
it(proc_desc) { should be_enabled }
it { should be_enabled }
end
Expand Down