Sha256: 245d3fc1b8e424ab19deda2f8960ad697c9f5eb42b92c4b1928aa6285ac1797f

Contents?: true

Size: 1.51 KB

Versions: 8

Compression:

Stored size: 1.51 KB

Contents

require 'spec_helper'
describe "The CVE-2014-7818 vulnerability" do
	before(:all) do
		@check = Dawn::Kb::CVE_2014_7818.new
		# @check.debug = true
	end
  it "is reported when vulnerable rails gem is used (3.2.18)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.2.18'}]
    @check.vuln?.should   == true
  end
  it "is reported when vulnerable rails gem is used (4.0.7)" do
    @check.dependencies = [{:name=>"rails", :version=>'4.0.7'}]
    @check.vuln?.should   == true
  end
  it "is reported when vulnerable rails gem is used (4.1.6)" do
    @check.dependencies = [{:name=>"rails", :version=>'4.1.6'}]
    @check.vuln?.should   == true
  end
  it "is reported when vulnerable rails gem is used (4.2.0.beta2)" do
    @check.dependencies = [{:name=>"rails", :version=>'4.2.0.beta2'}]
    @check.vuln?.should   == true
  end

  # SAFE VERSIONS
  it "is not reported when safe rails gem is used (3.2.20)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.2.20'}]
    @check.vuln?.should   == false
  end
  it "is not reported when safe rails gem is used (4.0.11)" do
    @check.dependencies = [{:name=>"rails", :version=>'4.0.11'}]
    @check.vuln?.should   == false
  end
  it "is not reported when safe rails gem is used (4.1.7)" do
    @check.dependencies = [{:name=>"rails", :version=>'4.1.7'}]
    @check.vuln?.should   == false
  end
  it "is not reported when safe rails gem is used (4.2.0.beta3)" do
    @check.dependencies = [{:name=>"rails", :version=>'4.2.0.beta3'}]
    @check.vuln?.should   == false
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dawnscanner-1.6.1 spec/lib/kb/cve_2014_7818_spec.rb
dawnscanner-1.6.0 spec/lib/kb/cve_2014_7818_spec.rb
dawnscanner-1.5.2 spec/lib/kb/cve_2014_7818_spec.rb
dawnscanner-1.5.1 spec/lib/kb/cve_2014_7818_spec.rb
dawnscanner-1.5.0 spec/lib/kb/cve_2014_7818_spec.rb
dawnscanner-1.4.2 spec/lib/kb/cve_2014_7818_spec.rb
dawnscanner-1.4.1 spec/lib/kb/cve_2014_7818_spec.rb
dawnscanner-1.4.0 spec/lib/kb/cve_2014_7818_spec.rb