dradis-brakeman 4.11.0 → 4.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -2
- data/lib/dradis/plugins/brakeman/gem_version.rb +1 -1
- data/lib/dradis/plugins/brakeman/importer.rb +2 -2
- data/lib/dradis/plugins/brakeman/mapping.rb +53 -0
- data/lib/dradis/plugins/brakeman.rb +1 -0
- metadata +8 -11
- data/templates/scan_info.fields +0 -11
- data/templates/scan_info.template +0 -18
- data/templates/warning.fields +0 -14
- data/templates/warning.template +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90577962578040e2c8d19cec0705f99785452159956c0e2506126f6ca10465c8
|
4
|
+
data.tar.gz: 5044fa833abc2ed6b717a7ea17ca6d33bbb41c0f6ff94a4cb70bbe4320b97da9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a786098b366dc4763a0321055194c1a99d8d3d29a3ed0f089f29c2948de1c969752d6a8538b80386e01326d774487bb8a50bd6fb24de5475ca63a3d3e7cad9c6
|
7
|
+
data.tar.gz: e65f3b2576730843a3b138fba4de28e5a9bacec25d1a7927fb1bddc1f038a64a9ee74d7c45b95ec2fa13f94e307428ba55376722fcee6bfe9fa81e5a783411d7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,8 +4,7 @@
|
|
4
4
|
|
5
5
|
Upload [Brakeman](http://brakemanscanner.org/) Rails security scanner JSON output into Dradis.
|
6
6
|
|
7
|
-
The add-on requires [Dradis CE](https://
|
8
|
-
|
7
|
+
The add-on requires [Dradis CE](https://dradis.com/ce/) > 3.0, or [Dradis Pro](https://dradis.com/).
|
9
8
|
|
10
9
|
## More information
|
11
10
|
|
@@ -24,7 +24,7 @@ module Dradis::Plugins::Brakeman
|
|
24
24
|
end
|
25
25
|
|
26
26
|
# choose a different parent based on the application path?
|
27
|
-
scan_info =
|
27
|
+
scan_info = mapping_service.apply_mapping(source: 'scan_info', data: data['scan_info'])
|
28
28
|
content_service.create_note text: scan_info
|
29
29
|
|
30
30
|
logger.info { "#{data['warnings'].count} Warnings\n===========" }
|
@@ -32,7 +32,7 @@ module Dradis::Plugins::Brakeman
|
|
32
32
|
data['warnings'].each do |warning|
|
33
33
|
logger.info { "* [#{warning['warning_type']}] #{warning['message']}" }
|
34
34
|
|
35
|
-
warning_info =
|
35
|
+
warning_info = mapping_service.apply_mapping(source: 'warning', data: warning)
|
36
36
|
content_service.create_issue text: warning_info, id: warning['warning_code']
|
37
37
|
end
|
38
38
|
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Dradis::Plugins::Brakeman
|
2
|
+
module Mapping
|
3
|
+
DEFAULT_MAPPING = {
|
4
|
+
scan_info: {
|
5
|
+
'Title' => 'Brakeman scan information',
|
6
|
+
'Application' => '{{ brakeman[scan_info.app_path] }}',
|
7
|
+
'BrakemanVersion' => '{{ brakeman[scan_info.brakeman_version] }}',
|
8
|
+
'RailsVersion' => '{{ brakeman[scan_info.rails_version] }}',
|
9
|
+
'WarningCount' => '{{ brakeman[scan_info.security_warnings] }}'
|
10
|
+
},
|
11
|
+
warning: {
|
12
|
+
'Title' => '{{ brakeman[warning.message] }}',
|
13
|
+
'Type' => '{{ brakeman[warning.warning_type] }}',
|
14
|
+
'Confidence' => '{{ brakeman[warning.confidence] }}',
|
15
|
+
'Path' => '{{ brakeman[warning.file] }}#{{ brakeman[warning.line] }}',
|
16
|
+
'Code' => 'bc.. {{ brakeman[warning.code] }}',
|
17
|
+
'References' => '{{ brakeman[warning.link] }}'
|
18
|
+
}
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
SOURCE_FIELDS = {
|
22
|
+
scan_info: [
|
23
|
+
'scan_info.app_path',
|
24
|
+
'scan_info.rails_version',
|
25
|
+
'scan_info.security_warnings',
|
26
|
+
'scan_info.start_time',
|
27
|
+
'scan_info.end_time',
|
28
|
+
'scan_info.duration',
|
29
|
+
'scan_info.number_of_controllers',
|
30
|
+
'scan_info.number_of_models',
|
31
|
+
'scan_info.number_of_templates',
|
32
|
+
'scan_info.ruby_version',
|
33
|
+
'scan_info.brakeman_version'
|
34
|
+
],
|
35
|
+
warning: [
|
36
|
+
'warning.warning_type',
|
37
|
+
'warning.warning_code',
|
38
|
+
'warning.fingerprint',
|
39
|
+
'warning.message',
|
40
|
+
'warning.file',
|
41
|
+
'warning.line',
|
42
|
+
'warning.link',
|
43
|
+
'warning.code',
|
44
|
+
'warning.render_path',
|
45
|
+
'warning.location_type',
|
46
|
+
'warning.location_class',
|
47
|
+
'warning.location_method',
|
48
|
+
'warning.user_input',
|
49
|
+
'warning.confidence'
|
50
|
+
]
|
51
|
+
}.freeze
|
52
|
+
end
|
53
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dradis-brakeman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Martin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dradis-plugins
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
version: 0.5.2
|
83
83
|
description: This add-on allows you to upload and parse output produced from Brakeman
|
84
84
|
Ruby on Rails security scanner into Dradis.
|
85
|
-
email:
|
85
|
+
email:
|
86
86
|
executables: []
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
@@ -105,21 +105,18 @@ files:
|
|
105
105
|
- lib/dradis/plugins/brakeman/field_processor.rb
|
106
106
|
- lib/dradis/plugins/brakeman/gem_version.rb
|
107
107
|
- lib/dradis/plugins/brakeman/importer.rb
|
108
|
+
- lib/dradis/plugins/brakeman/mapping.rb
|
108
109
|
- lib/dradis/plugins/brakeman/version.rb
|
109
110
|
- lib/tasks/thorfile.rb
|
110
111
|
- spec/brakeman_upload_spec.rb
|
111
112
|
- spec/spec_helper.rb
|
112
|
-
- templates/scan_info.fields
|
113
113
|
- templates/scan_info.sample
|
114
|
-
- templates/scan_info.template
|
115
|
-
- templates/warning.fields
|
116
114
|
- templates/warning.sample
|
117
|
-
- templates/warning.template
|
118
115
|
homepage: https://dradis.com/integrations/brakeman.html
|
119
116
|
licenses:
|
120
117
|
- GPL-2
|
121
118
|
metadata: {}
|
122
|
-
post_install_message:
|
119
|
+
post_install_message:
|
123
120
|
rdoc_options: []
|
124
121
|
require_paths:
|
125
122
|
- lib
|
@@ -134,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
131
|
- !ruby/object:Gem::Version
|
135
132
|
version: '0'
|
136
133
|
requirements: []
|
137
|
-
rubygems_version: 3.
|
138
|
-
signing_key:
|
134
|
+
rubygems_version: 3.1.4
|
135
|
+
signing_key:
|
139
136
|
specification_version: 4
|
140
137
|
summary: Brakeman add-on for the Dradis Framework.
|
141
138
|
test_files:
|
data/templates/scan_info.fields
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
scan_info.app_path
|
2
|
-
scan_info.rails_version
|
3
|
-
scan_info.security_warnings
|
4
|
-
scan_info.start_time
|
5
|
-
scan_info.end_time
|
6
|
-
scan_info.duration
|
7
|
-
scan_info.number_of_controllers
|
8
|
-
scan_info.number_of_models
|
9
|
-
scan_info.number_of_templates
|
10
|
-
scan_info.ruby_version
|
11
|
-
scan_info.brakeman_version
|
@@ -1,18 +0,0 @@
|
|
1
|
-
#[Title]#
|
2
|
-
Brakeman scan information
|
3
|
-
|
4
|
-
|
5
|
-
#[Application]#
|
6
|
-
%scan_info.app_path%
|
7
|
-
|
8
|
-
|
9
|
-
#[BrakemanVersion]#
|
10
|
-
%scan_info.brakeman_version%
|
11
|
-
|
12
|
-
|
13
|
-
#[RailsVersion]#
|
14
|
-
%scan_info.rails_version%
|
15
|
-
|
16
|
-
|
17
|
-
#[WarningCount]#
|
18
|
-
%scan_info.security_warnings%
|
data/templates/warning.fields
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
warning.warning_type
|
2
|
-
warning.warning_code
|
3
|
-
warning.fingerprint
|
4
|
-
warning.message
|
5
|
-
warning.file
|
6
|
-
warning.line
|
7
|
-
warning.link
|
8
|
-
warning.code
|
9
|
-
warning.render_path
|
10
|
-
warning.location_type
|
11
|
-
warning.location_class
|
12
|
-
warning.location_method
|
13
|
-
warning.user_input
|
14
|
-
warning.confidence
|
data/templates/warning.template
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#[Title]#
|
2
|
-
%warning.message%
|
3
|
-
|
4
|
-
|
5
|
-
#[Type]#
|
6
|
-
%warning.warning_type%
|
7
|
-
|
8
|
-
|
9
|
-
#[Confidence]#
|
10
|
-
%warning.confidence%
|
11
|
-
|
12
|
-
|
13
|
-
#[Path]#
|
14
|
-
%warning.file%#%warning.line%
|
15
|
-
|
16
|
-
|
17
|
-
#[Code]#
|
18
|
-
bc.. %warning.code%
|
19
|
-
|
20
|
-
|
21
|
-
#[References]#
|
22
|
-
%warning.link%
|