Sha256: d27c7784446f0d22cba0b092f767f2609ccb72457ce17d70a53cc90bdeb66e5c

Contents?: true

Size: 854 Bytes

Versions: 8

Compression:

Stored size: 854 Bytes

Contents

require 'spec_helper'
describe "The CVE-2013-0162 vulnerability" do
	before(:all) do
		@check = Dawn::Kb::CVE_2013_0162.new
		# @check.debug = true
	end
  it "is reported when ruby_parser version 1.x is used" do
    @check.dependencies = [{:name=>"ruby_parser", :version=>'1.4.5'}]
    expect(@check.vuln?).to eq(true)
  end
  it "is reported when ruby_parser version 2.x is used" do
    @check.dependencies = [{:name=>"ruby_parser", :version=>'2.4.5'}]
    expect(@check.vuln?).to eq(true)
  end
  it "is reported when ruby_parser version 3.0.x is used" do
    @check.dependencies = [{:name=>"ruby_parser", :version=>'3.0.5'}]
    expect(@check.vuln?).to eq(true)
  end
  it "is not reported when ruby_parser version 3.1.1 is used" do
    @check.dependencies = [{:name=>"ruby_parser", :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_2013_0162_spec.rb
dawnscanner-1.6.8 spec/lib/kb/cve_2013_0162_spec.rb
dawnscanner-1.6.7 spec/lib/kb/cve_2013_0162_spec.rb
dawnscanner-1.6.6 spec/lib/kb/cve_2013_0162_spec.rb
dawnscanner-1.6.5 spec/lib/kb/cve_2013_0162_spec.rb
dawnscanner-1.6.4 spec/lib/kb/cve_2013_0162_spec.rb
dawnscanner-1.6.3 spec/lib/kb/cve_2013_0162_spec.rb
dawnscanner-1.6.2 spec/lib/kb/cve_2013_0162_spec.rb