Sha256: f10c8877d57139b394b2583acb657970d681233bad956d249b24817fca488468

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

require 'spec_helper'
describe "The CVE-2011-2930 vulnerability" do
	before(:all) do
		@check = Codesake::Dawn::Kb::CVE_2011_2930.new
		# @check.debug = true
	end
  it "fires when vulnerable rails version is used (2.3.12)" do
    @check.dependencies = [{:name=>"rails", :version=>'2.3.12'}]
    @check.vuln?.should   be_true
  end
  it "fires when vulnerable rails version is used (3.0.9)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.0.9'}]
    @check.vuln?.should   be_true
  end
  it "fires when vulnerable rails version is used (3.1.0)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.1.0'}]
    @check.vuln?.should   be_true
  end
  it "doesn't fire when safe rails version is used (2.3.14)" do
    @check.dependencies = [{:name=>"rails", :version=>'2.3.14'}]
    @check.vuln?.should   be_false
  end
  it "doesn't fire when safe rails version is used (3.0.10)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.0.10'}]
    @check.vuln?.should   be_false
  end
  it "doesn't fire when safe rails version is used (3.1.1.)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.1.1'}]
    @check.vuln?.should   be_false
  end
          # self.safe_dependencies = [{:name=>"rails", :version=>['2.3.13', '3.0.10', '3.1.1']}]
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
codesake-dawn-1.0.6 spec/lib/kb/cve_2011_2930_spec.rb
codesake-dawn-1.0.5 spec/lib/kb/cve_2011_2930_spec.rb
codesake-dawn-1.0.4 spec/lib/kb/cve_2011_2930_spec.rb
codesake-dawn-1.0.3 spec/lib/kb/cve_2011_2930_spec.rb
codesake-dawn-1.0.2 spec/lib/kb/cve_2011_2930_spec.rb
codesake-dawn-1.0.1 spec/lib/kb/cve_2011_2930_spec.rb
codesake-dawn-1.0.0 spec/lib/kb/cve_2011_2930_spec.rb