Last active
August 29, 2015 14:07
-
-
Save tam7t/04313f41a5b8544f5188 to your computer and use it in GitHub Desktop.
OpenSSL Version/Configuration spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
describe 'OpenSSL' do | |
describe 'configuration' do | |
it 'is secure' do | |
expect(JSON.parse(Faraday.get('https://www.howsmyssl.com/a/check').body)['rating']).to eq 'Probably Okay' | |
end | |
end | |
describe 'library' do | |
before do | |
cpe_parts = OpenSSL::OPENSSL_VERSION.downcase.split(' ') | |
cpe_identifier = "cpe:/a:openssl:#{cpe_parts[0]}:#{cpe_parts[1]}" | |
visit "http://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=#{cpe_identifier}" | |
end | |
it 'is up to date' do | |
page.driver.render("./tmp/openssl-cve-#{Date.today}.png", full: true) | |
expect(page).to have_content('There are 0 matching records.') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment