Sha256: b20fb59fe5a187d358bc2527dd1e24efdf16fb20080c28e2a1d93dd80946f909

Contents?: true

Size: 1.17 KB

Versions: 8

Compression:

Stored size: 1.17 KB

Contents

require 'spec_helper'
describe "The CVE-2011-2930 vulnerability" do
  before(:all) do
    @check = 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'}]
    expect(@check.vuln?).to   eq(true)
  end
  it "fires when vulnerable rails version is used (3.0.9)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.0.9'}]
    expect(@check.vuln?).to   eq(true)
  end
  it "fires when vulnerable rails version is used (3.1.0)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.1.0'}]
    expect(@check.vuln?).to   eq(true)
  end
  it "doesn't fire when safe rails version is used (2.3.14)" do
    @check.dependencies = [{:name=>"rails", :version=>'2.3.14'}]
    expect(@check.vuln?).to   eq(false)
  end
  it "doesn't fire when safe rails version is used (3.0.10)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.0.10'}]
    expect(@check.vuln?).to   eq(false)
  end
  it "doesn't fire when safe rails version is used (3.1.1)" do
    @check.dependencies = [{:name=>"rails", :version=>'3.1.1'}]
    expect(@check.vuln?).to   eq(false)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dawnscanner-1.6.9 spec/lib/kb/cve_2011_2930_spec.rb
dawnscanner-1.6.8 spec/lib/kb/cve_2011_2930_spec.rb
dawnscanner-1.6.7 spec/lib/kb/cve_2011_2930_spec.rb
dawnscanner-1.6.6 spec/lib/kb/cve_2011_2930_spec.rb
dawnscanner-1.6.5 spec/lib/kb/cve_2011_2930_spec.rb
dawnscanner-1.6.4 spec/lib/kb/cve_2011_2930_spec.rb
dawnscanner-1.6.3 spec/lib/kb/cve_2011_2930_spec.rb
dawnscanner-1.6.2 spec/lib/kb/cve_2011_2930_spec.rb