Skip to content

Instantly share code, notes, and snippets.

@tam7t
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tam7t/04313f41a5b8544f5188 to your computer and use it in GitHub Desktop.
Save tam7t/04313f41a5b8544f5188 to your computer and use it in GitHub Desktop.
OpenSSL Version/Configuration spec
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