dawnscanner 1.3.1 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/BUGS.md +14 -0
- data/Changelog.md +27 -1
- data/KnowledgeBase.md +19 -2
- data/LICENSE.txt +2 -2
- data/README.md +2 -2
- data/Rakefile +100 -0
- data/Roadmap.md +25 -11
- data/VERSION +16 -0
- data/bin/dawn +9 -5
- data/checksum/dawnscanner-1.3.1.gem.sha1 +1 -0
- data/dawnscanner.gemspec +5 -6
- data/lib/dawn/kb/basic_check.rb +25 -10
- data/lib/dawn/kb/cve_2004_0755.rb +3 -0
- data/lib/dawn/kb/cve_2004_0983.rb +3 -0
- data/lib/dawn/kb/cve_2005_1992.rb +3 -0
- data/lib/dawn/kb/cve_2005_2337.rb +3 -0
- data/lib/dawn/kb/cve_2006_3694.rb +2 -0
- data/lib/dawn/kb/cve_2007_0469.rb +2 -0
- data/lib/dawn/kb/cve_2007_5380.rb +2 -0
- data/lib/dawn/kb/cve_2007_6077.rb +2 -0
- data/lib/dawn/kb/cve_2007_6612.rb +2 -0
- data/lib/dawn/kb/cve_2013_6416.rb +1 -1
- data/lib/dawn/kb/cve_2015_1840/cve_2015_1840_a.rb +28 -0
- data/lib/dawn/kb/cve_2015_1840/cve_2015_1840_b.rb +28 -0
- data/lib/dawn/kb/cve_2015_2963.rb +27 -0
- data/lib/dawn/kb/cve_2015_3224.rb +26 -0
- data/lib/dawn/kb/cve_2015_3225.rb +28 -0
- data/lib/dawn/kb/cve_2015_3226.rb +27 -0
- data/lib/dawn/kb/cve_2015_3227.rb +27 -0
- data/lib/dawn/kb/osvdb_118579.rb +31 -0
- data/lib/dawn/kb/osvdb_118830.rb +32 -0
- data/lib/dawn/kb/osvdb_118954.rb +31 -0
- data/lib/dawn/kb/osvdb_119878.rb +32 -0
- data/lib/dawn/kb/osvdb_119927.rb +33 -0
- data/lib/dawn/kb/owasp_ror_cheatsheet/session_stored_in_database.rb +1 -1
- data/lib/dawn/knowledge_base.rb +34 -0
- data/lib/dawn/logger.rb +16 -0
- data/lib/dawn/reporter.rb +19 -19
- data/lib/dawn/utils.rb +2 -2
- data/lib/dawn/version.rb +5 -24
- data/lib/dawnscanner.rb +2 -1
- data/spec/lib/dawn/codesake_knowledgebase_spec.rb +66 -15
- data/spec/lib/kb/cve_2015_1840_spec.rb +35 -0
- data/spec/lib/kb/cve_2015_2963_spec.rb +17 -0
- data/spec/lib/kb/cve_2015_3224_spec.rb +16 -0
- data/spec/lib/kb/cve_2015_3225_spec.rb +23 -0
- data/spec/lib/kb/cve_2015_3226_spec.rb +29 -0
- data/spec/lib/kb/cve_2015_3227_spec.rb +23 -0
- data/spec/lib/kb/osvdb_118579_spec.rb +8 -0
- data/spec/lib/kb/osvdb_118830_spec.rb +16 -0
- data/spec/lib/kb/osvdb_118954_spec.rb +8 -0
- data/spec/lib/kb/osvdb_119878_spec.rb +17 -0
- data/spec/lib/kb/osvdb_119927_spec.rb +16 -0
- data/spec/spec_helper.rb +3 -2
- metadata +63 -21
- metadata.gz.sig +0 -0
@@ -20,7 +20,7 @@
|
|
20
20
|
:avoid_comments=>true,
|
21
21
|
:check_family=>:owasp_ror_cheatsheet,
|
22
22
|
:severity=>:info,
|
23
|
-
:evidences=>["In your session_store.rb file you are not using
|
23
|
+
:evidences=>["In your session_store.rb file you are not using ActiveRecord to store session data. This will let rails to use a cookie based session and it can expose your web application to a session replay attack."],
|
24
24
|
:mitigation=>"Use ActiveRecord or the ORM you love most to handle your code session_store. Add \"Application.config.session_store :active_record_store\" to your session_store.rb file."
|
25
25
|
})
|
26
26
|
# @debug = true
|
data/lib/dawn/knowledge_base.rb
CHANGED
@@ -221,6 +221,21 @@ require "dawn/kb/cve_2014_2538"
|
|
221
221
|
require "dawn/kb/cve_2014_3482"
|
222
222
|
require "dawn/kb/cve_2014_3483"
|
223
223
|
|
224
|
+
# CVE - 2015
|
225
|
+
|
226
|
+
|
227
|
+
# CVE-2015-1840 is spread in two classes because a single CVE is assigned to a
|
228
|
+
# vulnerability affecting two differents but related gems. An idiot hack to
|
229
|
+
# mitigate an idiot decision.
|
230
|
+
require "dawn/kb/cve_2015_1840/cve_2015_1840_a"
|
231
|
+
require "dawn/kb/cve_2015_1840/cve_2015_1840_b"
|
232
|
+
require "dawn/kb/cve_2015_2963"
|
233
|
+
require "dawn/kb/cve_2015_3224"
|
234
|
+
require "dawn/kb/cve_2015_3225"
|
235
|
+
require "dawn/kb/cve_2015_3226"
|
236
|
+
require "dawn/kb/cve_2015_3227"
|
237
|
+
|
238
|
+
|
224
239
|
# OSVDB
|
225
240
|
|
226
241
|
require "dawn/kb/osvdb_105971"
|
@@ -228,6 +243,12 @@ require "dawn/kb/osvdb_108569"
|
|
228
243
|
require "dawn/kb/osvdb_108570"
|
229
244
|
require "dawn/kb/osvdb_108530"
|
230
245
|
require "dawn/kb/osvdb_108563"
|
246
|
+
require "dawn/kb/osvdb_118579"
|
247
|
+
require "dawn/kb/osvdb_118830"
|
248
|
+
require "dawn/kb/osvdb_118954"
|
249
|
+
require "dawn/kb/osvdb_119878"
|
250
|
+
require "dawn/kb/osvdb_119927"
|
251
|
+
|
231
252
|
|
232
253
|
|
233
254
|
module Dawn
|
@@ -470,6 +491,14 @@ module Dawn
|
|
470
491
|
Dawn::Kb::CVE_2014_2538.new,
|
471
492
|
Dawn::Kb::CVE_2014_3482.new,
|
472
493
|
Dawn::Kb::CVE_2014_3483.new,
|
494
|
+
Dawn::Kb::CVE_2015_1840_a.new,
|
495
|
+
Dawn::Kb::CVE_2015_1840_b.new,
|
496
|
+
Dawn::Kb::CVE_2015_2963.new,
|
497
|
+
Dawn::Kb::CVE_2015_3224.new,
|
498
|
+
Dawn::Kb::CVE_2015_3225.new,
|
499
|
+
Dawn::Kb::CVE_2015_3226.new,
|
500
|
+
Dawn::Kb::CVE_2015_3227.new,
|
501
|
+
|
473
502
|
|
474
503
|
# OSVDB Checks are still here since are all about dependencies
|
475
504
|
Dawn::Kb::OSVDB_105971.new,
|
@@ -477,6 +506,11 @@ module Dawn
|
|
477
506
|
Dawn::Kb::OSVDB_108570.new,
|
478
507
|
Dawn::Kb::OSVDB_108530.new,
|
479
508
|
Dawn::Kb::OSVDB_108563.new,
|
509
|
+
Dawn::Kb::OSVDB_118579.new,
|
510
|
+
Dawn::Kb::OSVDB_118830.new,
|
511
|
+
Dawn::Kb::OSVDB_118954.new,
|
512
|
+
Dawn::Kb::OSVDB_119878.new,
|
513
|
+
Dawn::Kb::OSVDB_119927.new,
|
480
514
|
]
|
481
515
|
# END @cve_security_checks array
|
482
516
|
# START @owasp_ror_cheatsheet_checks array
|
data/lib/dawn/logger.rb
ADDED
data/lib/dawn/reporter.rb
CHANGED
@@ -227,34 +227,34 @@ module Dawn
|
|
227
227
|
|
228
228
|
def ascii_plain_report
|
229
229
|
|
230
|
-
$logger.
|
231
|
-
$logger.
|
232
|
-
$logger.
|
233
|
-
$logger.
|
230
|
+
$logger.info "scanning #{@engine.target}"
|
231
|
+
$logger.info "#{@engine.name} v#{@engine.get_mvc_version} detected" unless @engine.name == "Gemfile.lock"
|
232
|
+
$logger.info "#{@engine.force} v#{@engine.get_mvc_version} detected" if @engine.name == "Gemfile.lock"
|
233
|
+
$logger.info "applying all security checks"
|
234
234
|
if @ret
|
235
|
-
$logger.
|
235
|
+
$logger.info "#{@engine.applied_checks} security checks applied - #{@engine.skipped_checks} security checks skipped"
|
236
236
|
else
|
237
|
-
$logger.
|
237
|
+
$logger.error "no security checks in the knowledge base"
|
238
238
|
end
|
239
239
|
|
240
240
|
if @engine.count_vulnerabilities != 0
|
241
|
-
$logger.
|
241
|
+
$logger.info "#{@engine.count_vulnerabilities} vulnerabilities found"
|
242
242
|
@engine.vulnerabilities.each do |vuln|
|
243
|
-
$logger.
|
244
|
-
$logger.
|
245
|
-
$logger.
|
246
|
-
$logger.
|
247
|
-
$logger.
|
248
|
-
$logger.
|
243
|
+
$logger.error "#{vuln[:name]} check failed"
|
244
|
+
$logger.info "Severity: #{vuln[:severity]}"
|
245
|
+
$logger.info "Priority: #{vuln[:priority]}"
|
246
|
+
$logger.info "Description: #{vuln[:message]}"
|
247
|
+
$logger.info "Solution: #{vuln[:remediation]}"
|
248
|
+
$logger.info "Evidence:"
|
249
249
|
vuln[:evidences].each do |evidence|
|
250
|
-
$logger.
|
250
|
+
$logger.info "\t#{evidence}"
|
251
251
|
end
|
252
252
|
end
|
253
253
|
if @engine.has_reflected_xss?
|
254
|
-
$logger.
|
254
|
+
$logger.info "#{@engine.reflected_xss.count} reflected XSS found"
|
255
255
|
@engine.reflected_xss.each do |vuln|
|
256
|
-
$logger.
|
257
|
-
$logger.
|
256
|
+
$logger.info "request parameter \"#{vuln[:sink_source]}\" is used without escaping in #{vuln[:sink_view]}. It was read here: #{vuln[:sink_file]}@#{vuln[:sink_line]}"
|
257
|
+
$logger.error "evidence: #{vuln[:sink_evidence]}"
|
258
258
|
end
|
259
259
|
end
|
260
260
|
|
@@ -263,11 +263,11 @@ module Dawn
|
|
263
263
|
end
|
264
264
|
|
265
265
|
if @engine.mitigated_issues.count != 0
|
266
|
-
$logger.
|
266
|
+
$logger.info "#{@engine.mitigated_issues.count} mitigated vulnerabilities found"
|
267
267
|
@engine.mitigated_issues.each do |vuln|
|
268
268
|
$logger.ok "#{vuln[:name]} mitigated"
|
269
269
|
vuln[:evidences].each do |evidence|
|
270
|
-
$logger.
|
270
|
+
$logger.error evidence
|
271
271
|
end
|
272
272
|
end
|
273
273
|
end
|
data/lib/dawn/utils.rb
CHANGED
@@ -8,11 +8,11 @@ module Dawn
|
|
8
8
|
__debug_me_and_return(msg, false)
|
9
9
|
end
|
10
10
|
def debug_me(msg)
|
11
|
-
$logger.
|
11
|
+
$logger.debug(msg) if @debug
|
12
12
|
end
|
13
13
|
|
14
14
|
def __debug_me_and_return(msg, status)
|
15
|
-
$logger.
|
15
|
+
$logger.debug(msg) if @debug
|
16
16
|
return status
|
17
17
|
end
|
18
18
|
end
|
data/lib/dawn/version.rb
CHANGED
@@ -1,26 +1,7 @@
|
|
1
1
|
module Dawn
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
# him too, # this is a kinda sort of tribute of my son's passion.
|
8
|
-
#
|
9
|
-
# Future releases
|
10
|
-
#
|
11
|
-
# | Character | Release |
|
12
|
-
# |-----------------|---------|
|
13
|
-
# | "Tow Mater" | 2.0.0 |
|
14
|
-
# | "Finn McMissile"| 3.0.0 |
|
15
|
-
# | "Fillmore" | 4.0.0 |
|
16
|
-
# |"Holly Shiftwell"| 5.0.0 |
|
17
|
-
# | "Guido" | 6.0.0 |
|
18
|
-
# | "Luigi" | 7.0.0 |
|
19
|
-
# | "Doc Hudson" | 8.0.0 |
|
20
|
-
|
21
|
-
VERSION = "1.3.1"
|
22
|
-
CODENAME = "Lightning McQueen"
|
23
|
-
# RELEASE = "(development)"
|
24
|
-
RELEASE = "20150219"
|
25
|
-
|
2
|
+
VERSION = "1.3.5"
|
3
|
+
CODENAME = "Lightning McQueen"
|
4
|
+
RELEASE = "20150729"
|
5
|
+
BUILD = "31"
|
6
|
+
COMMIT = "ge32c804"
|
26
7
|
end
|
data/lib/dawnscanner.rb
CHANGED
@@ -910,31 +910,82 @@ describe "The Codesake Dawn knowledge base" do
|
|
910
910
|
end
|
911
911
|
|
912
912
|
it "must have test for OSVDB-108570" do
|
913
|
-
|
914
|
-
|
915
|
-
|
913
|
+
sc = kb.find("OSVDB-108570")
|
914
|
+
sc.should_not be_nil
|
915
|
+
sc.class.should == Dawn::Kb::OSVDB_108570
|
916
916
|
end
|
917
917
|
|
918
918
|
it "must have test for OSVDB-108530" do
|
919
|
-
|
920
|
-
|
921
|
-
|
919
|
+
sc = kb.find("OSVDB-108530")
|
920
|
+
sc.should_not be_nil
|
921
|
+
sc.class.should == Dawn::Kb::OSVDB_108530
|
922
922
|
end
|
923
923
|
it "must have test for OSVDB-108563" do
|
924
|
-
|
925
|
-
|
926
|
-
|
924
|
+
sc = kb.find("OSVDB-108563")
|
925
|
+
sc.should_not be_nil
|
926
|
+
sc.class.should == Dawn::Kb::OSVDB_108563
|
927
927
|
end
|
928
928
|
|
929
929
|
it "must have test for CVE-2014-3482" do
|
930
|
-
|
931
|
-
|
932
|
-
|
930
|
+
sc = kb.find("CVE-2014-3482")
|
931
|
+
sc.should_not be_nil
|
932
|
+
sc.class.should == Dawn::Kb::CVE_2014_3482
|
933
933
|
end
|
934
934
|
|
935
935
|
it "must have test for CVE-2014-3483" do
|
936
|
-
|
937
|
-
|
938
|
-
|
936
|
+
sc = kb.find("CVE-2014-3483")
|
937
|
+
sc.should_not be_nil
|
938
|
+
sc.class.should == Dawn::Kb::CVE_2014_3483
|
939
|
+
end
|
940
|
+
it "must have test for OSVDB_119927" do
|
941
|
+
sc = kb.find("OSVDB_119927")
|
942
|
+
sc.should_not be_nil
|
943
|
+
sc.class.should == Dawn::Kb::OSVDB_119927
|
944
|
+
end
|
945
|
+
it "must have test for OSVDB_119878" do
|
946
|
+
sc = kb.find("OSVDB_119878")
|
947
|
+
sc.should_not be_nil
|
948
|
+
sc.class.should == Dawn::Kb::OSVDB_119878
|
949
|
+
end
|
950
|
+
it "must have test for OSVDB_118954" do
|
951
|
+
sc = kb.find("OSVDB_118954")
|
952
|
+
sc.should_not be_nil
|
953
|
+
sc.class.should == Dawn::Kb::OSVDB_118954
|
954
|
+
end
|
955
|
+
it "must have test for OSVDB_118579" do
|
956
|
+
sc = kb.find("OSVDB_118579")
|
957
|
+
sc.should_not be_nil
|
958
|
+
sc.class.should == Dawn::Kb::OSVDB_118579
|
959
|
+
end
|
960
|
+
it "must have test for OSVDB_118830" do
|
961
|
+
sc = kb.find("OSVDB_118830")
|
962
|
+
sc.should_not be_nil
|
963
|
+
sc.class.should == Dawn::Kb::OSVDB_118830
|
964
|
+
end
|
965
|
+
it "must have test for CVE-2015-3224" do
|
966
|
+
sc = kb.find("CVE-2015-3224")
|
967
|
+
sc.should_not be_nil
|
968
|
+
sc.class.should == Dawn::Kb::CVE_2015_3224
|
969
|
+
end
|
970
|
+
it "must have test for CVE-2015-3225" do
|
971
|
+
sc = kb.find("CVE-2015-3225")
|
972
|
+
sc.should_not be_nil
|
973
|
+
sc.class.should == Dawn::Kb::CVE_2015_3225
|
974
|
+
end
|
975
|
+
it "must have test for CVE-2015-3227" do
|
976
|
+
sc = kb.find("CVE-2015-3227")
|
977
|
+
sc.should_not be_nil
|
978
|
+
sc.class.should == Dawn::Kb::CVE_2015_3227
|
979
|
+
end
|
980
|
+
it "must have test for CVE-2015-3226" do
|
981
|
+
sc = kb.find("CVE-2015-3226")
|
982
|
+
sc.should_not be_nil
|
983
|
+
sc.class.should == Dawn::Kb::CVE_2015_3226
|
984
|
+
end
|
985
|
+
it "must have test for CVE-2015-2963" do
|
986
|
+
sc = kb.find("CVE-2015-2963")
|
987
|
+
sc.should_not be_nil
|
988
|
+
sc.class.should == Dawn::Kb::CVE_2015_2963
|
939
989
|
end
|
990
|
+
it "CVE-2015-1840 can't be tested. Trust me. It works"
|
940
991
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe "The CVE-2015-1840 vulnerability" do
|
3
|
+
before(:all) do
|
4
|
+
@check_a = Dawn::Kb::CVE_2015_1840_a.new
|
5
|
+
@check_b = Dawn::Kb::CVE_2015_1840_b.new
|
6
|
+
end
|
7
|
+
it "is reported when vulnerable jquery-rails gem is used (3.1.2)" do
|
8
|
+
@check_a.dependencies = [{:name=>"jquery-rails", :version=>'3.1.2'}]
|
9
|
+
@check_a.vuln?.should == true
|
10
|
+
end
|
11
|
+
it "is reported when vulnerable jquery-rails gem is used 4.0.1)" do
|
12
|
+
@check_a.dependencies = [{:name=>"jquery-rails", :version=>'4.0.1'}]
|
13
|
+
@check_a.vuln?.should == true
|
14
|
+
end
|
15
|
+
it "is reported when vulnerable jquery-ujs gem is used 1.0.3)" do
|
16
|
+
@check_b.dependencies = [{:name=>"jquery-ujs", :version=>'1.0.3'}]
|
17
|
+
@check_b.vuln?.should == true
|
18
|
+
end
|
19
|
+
|
20
|
+
it "is reported when vulnerable jquery-rails gem is used (3.1.3)" do
|
21
|
+
@check_a.dependencies = [{:name=>"jquery-rails", :version=>'3.1.3'}]
|
22
|
+
@check_a.vuln?.should == false
|
23
|
+
end
|
24
|
+
it "is reported when vulnerable jquery-rails gem is used 4.0.2)" do
|
25
|
+
@check_a.dependencies = [{:name=>"jquery-rails", :version=>'4.0.2'}]
|
26
|
+
@check_a.vuln?.should == false
|
27
|
+
end
|
28
|
+
it "is reported when vulnerable jquery-ujs gem is used 1.0.4)" do
|
29
|
+
@check_b.dependencies = [{:name=>"jquery-ujs", :version=>'1.0.4'}]
|
30
|
+
@check_b.vuln?.should == false
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe "The CVE-2015-2963 vulnerability" do
|
3
|
+
before(:all) do
|
4
|
+
@check = Dawn::Kb::CVE_2015_2963.new
|
5
|
+
# @check.debug = true
|
6
|
+
end
|
7
|
+
it "is reported when vulnerable paperclip gem is used 4.2.1)" do
|
8
|
+
@check.dependencies = [{:name=>"paperclip", :version=>'4.2.1'}]
|
9
|
+
@check.vuln?.should == true
|
10
|
+
end
|
11
|
+
|
12
|
+
it "is reported when not vulnerable paperclip gem is used (4.2.2)" do
|
13
|
+
@check.dependencies = [{:name=>"paperclip", :version=>'4.2.2'}]
|
14
|
+
@check.vuln?.should == false
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe "The CVE-2015-3224 vulnerability" do
|
3
|
+
before(:all) do
|
4
|
+
@check = Dawn::Kb::CVE_2015_3224.new
|
5
|
+
# @check.debug = true
|
6
|
+
end
|
7
|
+
it "is reported when vulnerable web-console gem is used (2.1.2)" do
|
8
|
+
@check.dependencies = [{:name=>"web-console", :version=>'2.1.2'}]
|
9
|
+
@check.vuln?.should == true
|
10
|
+
end
|
11
|
+
it "is not reported when safe rack gem is used (2.1.3)" do
|
12
|
+
@check.dependencies = [{:name=>"web-console", :version=>'2.1.3'}]
|
13
|
+
@check.vuln?.should == false
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe "The CVE-2015-3225 vulnerability" do
|
3
|
+
before(:all) do
|
4
|
+
@check = Dawn::Kb::CVE_2015_3225.new
|
5
|
+
# @check.debug = true
|
6
|
+
end
|
7
|
+
it "is reported when vulnerable rack gem is used (1.5.3)" do
|
8
|
+
@check.dependencies = [{:name=>"rack", :version=>'1.5.3'}]
|
9
|
+
@check.vuln?.should == true
|
10
|
+
end
|
11
|
+
it "is reported when vulnerable rack gem is used (1.6.1)" do
|
12
|
+
@check.dependencies = [{:name=>"rack", :version=>'1.6.1'}]
|
13
|
+
@check.vuln?.should == true
|
14
|
+
end
|
15
|
+
it "is not reported when safe rack gem is used (1.5.4)" do
|
16
|
+
@check.dependencies = [{:name=>"rack", :version=>'1.5.4'}]
|
17
|
+
@check.vuln?.should == false
|
18
|
+
end
|
19
|
+
it "is not reported when safe rack gem is used (1.6.3)" do
|
20
|
+
@check.dependencies = [{:name=>"rack", :version=>'1.6.3'}]
|
21
|
+
@check.vuln?.should == false
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe "The CVE-2015-3226 vulnerability" do
|
3
|
+
before(:all) do
|
4
|
+
@check = Dawn::Kb::CVE_2015_3226.new
|
5
|
+
# @check.debug = true
|
6
|
+
end
|
7
|
+
|
8
|
+
it "is reported when vulnerable active_support gem is used (3.x.x)" do
|
9
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'3.2.11'}]
|
10
|
+
@check.vuln?.should == true
|
11
|
+
end
|
12
|
+
it "is reported when vulnerable active_support gem is used (4.1.11)" do
|
13
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.1.11'}]
|
14
|
+
@check.vuln?.should == true
|
15
|
+
end
|
16
|
+
it "is reported when vulnerable active_support gem is used (4.2.2)" do
|
17
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.2.2'}]
|
18
|
+
@check.vuln?.should == true
|
19
|
+
end
|
20
|
+
it "is not reported when safe active_support gem is used (4.1.12)" do
|
21
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.1.12'}]
|
22
|
+
@check.vuln?.should == false
|
23
|
+
end
|
24
|
+
it "is not reported when safe active_support gem is used (4.2.3)" do
|
25
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.2.3'}]
|
26
|
+
@check.vuln?.should == false
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe "The CVE-2015-3227 vulnerability" do
|
3
|
+
before(:all) do
|
4
|
+
@check = Dawn::Kb::CVE_2015_3227.new
|
5
|
+
@check.debug = true
|
6
|
+
end
|
7
|
+
it "is reported when vulnerable active_support gem is used (4.1.11)" do
|
8
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.1.11'}]
|
9
|
+
@check.vuln?.should == true
|
10
|
+
end
|
11
|
+
it "is reported when vulnerable active_support gem is used (4.2.2)" do
|
12
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.2.2'}]
|
13
|
+
@check.vuln?.should == true
|
14
|
+
end
|
15
|
+
it "is not reported when safe active_support gem is used (4.1.12)" do
|
16
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.1.12'}]
|
17
|
+
@check.vuln?.should == false
|
18
|
+
end
|
19
|
+
it "is not reported when safe active_support gem is used (4.2.3)" do
|
20
|
+
@check.dependencies = [{:name=>"activesupport", :version=>'4.2.3'}]
|
21
|
+
@check.vuln?.should == false
|
22
|
+
end
|
23
|
+
end
|