pronto-brakeman 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2671f9897b66aa34b11db36114386c2d1023b04
4
- data.tar.gz: f1d0369f39adbfe1ce3eded82589d15296ee3d37
3
+ metadata.gz: 1462c9ae1fe88941d78c4aae1e391e776073897e
4
+ data.tar.gz: 40e6028d592db09efc5a1d2572e44606b289c1bd
5
5
  SHA512:
6
- metadata.gz: 73fa6c38b8da1d48d2b68f4f31396f072cad5a42cff7a445f39ae4d0d95f1229189fe1a7ceda6cb8fd1197b16f33cc69571be639dccb74c569ec7c0fd911909c
7
- data.tar.gz: 4861ae69b9249b7530f65517cf3427187827593680872d3cc04595c4816f0aeb558431c2d29978b2bc28173a26f3db1a14b3e403f19413ff5aafaf4f46ede36b
6
+ metadata.gz: 87eaf9ca3c3fe14329edf0d5dbfd353056be8b95366b3127562c2c9fc163928b39c2ffd9af8f9021bd44fa1cd36dda2f183bfa7228638389fbba98055299c030
7
+ data.tar.gz: 03e4e874af4e5995c7f7ffb0766a62ea3d7fa558975934e4c220928e08dd9eee9fa77205e4656b9db11382fa1486f472e10e42a2e396287b0a07abaead87dd4a
data/README.md CHANGED
@@ -6,3 +6,9 @@
6
6
  [![Dependency Status](https://gemnasium.com/mmozuras/pronto-brakeman.png)](https://gemnasium.com/mmozuras/pronto-brakeman)
7
7
 
8
8
  Pronto runner for [Brakeman](https://github.com/presidentbeef/brakeman), security vulnerability scanner for RoR. [What is Pronto?](https://github.com/mmozuras/pronto)
9
+
10
+ ## Severity mapping
11
+
12
+ Brakeman [Confiedence](https://github.com/presidentbeef/brakeman#confidence-levels) is mapped to severity levels on the
13
+ messages generated by Pronto. High confidence maps to fatal, medium confidence maps to warning, and low confidence maps
14
+ to info.
@@ -32,11 +32,23 @@ module Pronto
32
32
  end
33
33
 
34
34
  def new_message(line, warning)
35
- Message.new(line.patch.delta.new_file[:path], line, :warning,
35
+ Message.new(line.patch.delta.new_file[:path], line,
36
+ severity_for_confidence(warning.confidence),
36
37
  "Possible security vulnerability: #{warning.message}",
37
38
  nil, self.class)
38
39
  end
39
40
 
41
+ def severity_for_confidence(confidence_level)
42
+ case confidence_level
43
+ when 0 # Brakeman High confidence
44
+ :fatal
45
+ when 1 # Brakeman Medium confidence
46
+ :warning
47
+ else # Brakeman Low confidence (and other possibilities)
48
+ :info
49
+ end
50
+ end
51
+
40
52
  def patch_for_warning(ruby_patches, warning)
41
53
  ruby_patches.find do |patch|
42
54
  patch.new_file_full_path.to_s == warning.file
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module BrakemanVersion
3
- VERSION = '0.6.0'.freeze
3
+ VERSION = '0.7.0'.freeze
4
4
  end
5
5
  end
@@ -32,9 +32,9 @@ Gem::Specification.new do |s|
32
32
  s.extra_rdoc_files = ['LICENSE', 'README.md']
33
33
  s.require_paths = ['lib']
34
34
 
35
- s.add_runtime_dependency('pronto', '~> 0.6.0')
35
+ s.add_runtime_dependency('pronto', '~> 0.7.0')
36
36
  s.add_runtime_dependency('brakeman', '~> 3.2', '>= 3.2.0')
37
- s.add_development_dependency('rake', '~> 10.4')
38
- s.add_development_dependency('rspec', '~> 3.3')
37
+ s.add_development_dependency('rake', '~> 11.0')
38
+ s.add_development_dependency('rspec', '~> 3.4')
39
39
  s.add_development_dependency('rspec-its', '~> 1.2')
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-brakeman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindaugas Mozūras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-13 00:00:00.000000000 Z
11
+ date: 2016-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.0
19
+ version: 0.7.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.6.0
26
+ version: 0.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: brakeman
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '10.4'
53
+ version: '11.0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '10.4'
60
+ version: '11.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '3.3'
67
+ version: '3.4'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '3.3'
74
+ version: '3.4'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rspec-its
77
77
  requirement: !ruby/object:Gem::Requirement