dradis-nipper 4.10.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/.github/pull_request_template.md +45 -0
- data/CHANGELOG.md +7 -0
- data/README.md +1 -2
- data/lib/dradis/plugins/nipper/gem_version.rb +1 -1
- data/lib/dradis/plugins/nipper/importer.rb +2 -2
- data/lib/dradis/plugins/nipper/mapping.rb +50 -0
- data/lib/dradis/plugins/nipper.rb +1 -0
- metadata +8 -10
- data/templates/evidence.fields +0 -3
- data/templates/evidence.template +0 -8
- data/templates/issue.fields +0 -15
- data/templates/issue.template +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f8377871f64d9ed5b124dfae754181bd176235c414d29646e8bb08c6b7eb7ea
|
4
|
+
data.tar.gz: 215f41bb92b6f369eb9ebefba2ff0af8bb78dda2404558db71babb818aa05860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 869085b2efc2c60ea8223434e60c72fa7a7a66f84f2f3aff3775a848c5ffe4a71a6e37deff7ea5050e338c9ba489a58f5e05bcdee25c953cc732f0d46e00d768
|
7
|
+
data.tar.gz: 709dc9d2ca85726bb7965e1596274bc692d1bbd554bffa2883c4de78d94407467e010aeb4f5f266f0d9030038c59caa12fb24cccbfe71f0ef164ab51a86c4eb9
|
@@ -0,0 +1,45 @@
|
|
1
|
+
Please review [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md) and remove this line.
|
2
|
+
|
3
|
+
### Summary
|
4
|
+
|
5
|
+
Provide a general description of the code changes in your pull
|
6
|
+
request... were there any bugs you had fixed? If so, mention them. If
|
7
|
+
these bugs have open GitHub issues, be sure to tag them here as well,
|
8
|
+
to keep the conversation linked together.
|
9
|
+
|
10
|
+
|
11
|
+
### Testing Steps
|
12
|
+
|
13
|
+
Provide steps to test functionality, described in detail for someone not familiar with this part of the application / code base
|
14
|
+
|
15
|
+
|
16
|
+
### Other Information
|
17
|
+
|
18
|
+
If there's anything else that's important and relevant to your pull
|
19
|
+
request, mention that information here. This could include
|
20
|
+
benchmarks, or other information.
|
21
|
+
|
22
|
+
Thanks for contributing to Dradis!
|
23
|
+
|
24
|
+
|
25
|
+
### Copyright assignment
|
26
|
+
|
27
|
+
Collaboration is difficult with commercial closed source but we want
|
28
|
+
to keep as much of the OSS ethos as possible available to users
|
29
|
+
who want to fix it themselves.
|
30
|
+
|
31
|
+
In order to unambiguously own and sell Dradis Framework commercial
|
32
|
+
products, we must have the copyright associated with the entire
|
33
|
+
codebase. Any code you create which is merged must be owned by us.
|
34
|
+
That's not us trying to be a jerks, that's just the way it works.
|
35
|
+
|
36
|
+
You can delete this section, but the following sentence needs to
|
37
|
+
remain in the PR's description:
|
38
|
+
|
39
|
+
> I assign all rights, including copyright, to any future Dradis
|
40
|
+
> work by myself to Security Roots.
|
41
|
+
|
42
|
+
### Check List
|
43
|
+
|
44
|
+
- [ ] Added a CHANGELOG entry
|
45
|
+
- [ ] Added specs
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
|
3
3
|
This add-on will enable the user to upload Nipper output files in the XML format (.xml) to create a structure of Dradis nodes, issues, and evidences that contain the same information about the hosts and vulnerabilities in the original file.
|
4
4
|
|
5
|
-
The add-on requires Dradis 3.0 or
|
6
|
-
|
5
|
+
The add-on requires [Dradis CE](https://dradis.com/ce/) > 3.0, or [Dradis Pro](https://dradis.com/).
|
7
6
|
|
8
7
|
## More information
|
9
8
|
|
@@ -48,7 +48,7 @@ module Dradis::Plugins::Nipper
|
|
48
48
|
def process_evidence(xml_evidence, issue)
|
49
49
|
logger.info { 'Creating evidence...' }
|
50
50
|
|
51
|
-
evidence_text =
|
51
|
+
evidence_text = mapping_service.apply_mapping(source: 'evidence', data: xml_evidence)
|
52
52
|
content_service.create_evidence(issue: issue, node: @host_node, content: evidence_text)
|
53
53
|
end
|
54
54
|
|
@@ -57,7 +57,7 @@ module Dradis::Plugins::Nipper
|
|
57
57
|
|
58
58
|
logger.info { "Creating issue: #{plugin_id}" }
|
59
59
|
|
60
|
-
issue_text =
|
60
|
+
issue_text = mapping_service.apply_mapping(source: 'issue', data: xml_issue)
|
61
61
|
issue = content_service.create_issue(text: issue_text, id: plugin_id)
|
62
62
|
|
63
63
|
xml_evidence = xml_issue.at_xpath('./issuedetails/devices')
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Dradis::Plugins::Nipper
|
2
|
+
module Mapping
|
3
|
+
DEFAULT_MAPPING = {
|
4
|
+
evidence: {
|
5
|
+
'DeviceName' => '{{ nipper[evidence.device_name] }}',
|
6
|
+
'DeviceType' => '{{ nipper[evidence.device_type] }}',
|
7
|
+
'OS' => '{{ nipper[evidence.device_osversion] }}'
|
8
|
+
},
|
9
|
+
issue: {
|
10
|
+
'Title' => '{{ nipper[issue.title] }}',
|
11
|
+
'CVSSv2.Base' => '{{ nipper[issue.cvss_base] }}',
|
12
|
+
'CVSSv2.Temporal' => '{{ nipper[issue.cvss_temporal] }}',
|
13
|
+
'CVSSv2.Environmental' => '{{ nipper[issue.cvss_environmental] }}',
|
14
|
+
'Finding' => '{{ nipper[issue.finding] }}',
|
15
|
+
'Impact' => '{{ nipper[issue.impact] }}',
|
16
|
+
'Ease' => '{{ nipper[issue.ease] }}',
|
17
|
+
'Nipperv1.Ease' => '{{ nipper[issue.nipperv1_ease] }}',
|
18
|
+
'Nipperv1.Fix' => '{{ nipper[issue.nipperv1_fix] }}',
|
19
|
+
'Nipperv1.Impact' => '{{ nipper[issue.nipperv1_impact] }}',
|
20
|
+
'Nipperv1.Rating' => '{{ nipper[issue.nipperv1_rating] }}',
|
21
|
+
'Recommendation' => '{{ nipper[issue.recommendation] }}'
|
22
|
+
}
|
23
|
+
}.freeze
|
24
|
+
|
25
|
+
SOURCE_FIELDS = {
|
26
|
+
evidence: [
|
27
|
+
'evidence.device_name',
|
28
|
+
'evidence.device_type',
|
29
|
+
'evidence.device_osversion'
|
30
|
+
],
|
31
|
+
issue: [
|
32
|
+
'issue.title',
|
33
|
+
'issue.cvss_base',
|
34
|
+
'issue.cvss_base_vector',
|
35
|
+
'issue.cvss_temporal',
|
36
|
+
'issue.cvss_temporal_vector',
|
37
|
+
'issue.cvss_environmental',
|
38
|
+
'issue.cvss_environmental_vector',
|
39
|
+
'issue.finding',
|
40
|
+
'issue.impact',
|
41
|
+
'issue.ease',
|
42
|
+
'issue.nipperv1_ease',
|
43
|
+
'issue.nipperv1_fix',
|
44
|
+
'issue.nipperv1_impact',
|
45
|
+
'issue.nipperv1_rating',
|
46
|
+
'issue.recommendation'
|
47
|
+
]
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dradis-nipper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dradis Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dradis-plugins
|
@@ -81,11 +81,12 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.5.2
|
83
83
|
description: This add-on allows you to upload and parse reports from Nipper.
|
84
|
-
email:
|
84
|
+
email:
|
85
85
|
executables: []
|
86
86
|
extensions: []
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
|
+
- ".github/pull_request_template.md"
|
89
90
|
- ".gitignore"
|
90
91
|
- CHANGELOG.md
|
91
92
|
- CHANGELOG.template
|
@@ -101,6 +102,7 @@ files:
|
|
101
102
|
- lib/dradis/plugins/nipper/field_processor.rb
|
102
103
|
- lib/dradis/plugins/nipper/gem_version.rb
|
103
104
|
- lib/dradis/plugins/nipper/importer.rb
|
105
|
+
- lib/dradis/plugins/nipper/mapping.rb
|
104
106
|
- lib/dradis/plugins/nipper/version.rb
|
105
107
|
- lib/nipper/evidence.rb
|
106
108
|
- lib/nipper/issue.rb
|
@@ -111,17 +113,13 @@ files:
|
|
111
113
|
- spec/spec_helper.rb
|
112
114
|
- spec/upload_v2.5_spec.rb
|
113
115
|
- spec/upload_v2.8_spec.rb
|
114
|
-
- templates/evidence.fields
|
115
116
|
- templates/evidence.sample
|
116
|
-
- templates/evidence.template
|
117
|
-
- templates/issue.fields
|
118
117
|
- templates/issue.sample
|
119
|
-
- templates/issue.template
|
120
118
|
homepage: https://dradis.com/integrations/nipper.html
|
121
119
|
licenses:
|
122
120
|
- Commercial - Dradis Pro
|
123
121
|
metadata: {}
|
124
|
-
post_install_message:
|
122
|
+
post_install_message:
|
125
123
|
rdoc_options: []
|
126
124
|
require_paths:
|
127
125
|
- lib
|
@@ -137,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
135
|
version: '0'
|
138
136
|
requirements: []
|
139
137
|
rubygems_version: 3.1.4
|
140
|
-
signing_key:
|
138
|
+
signing_key:
|
141
139
|
specification_version: 4
|
142
140
|
summary: Nipper upload add-on for Dradis Framework.
|
143
141
|
test_files:
|
data/templates/evidence.fields
DELETED
data/templates/evidence.template
DELETED
data/templates/issue.fields
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
issue.title
|
2
|
-
issue.cvss_base
|
3
|
-
issue.cvss_base_vector
|
4
|
-
issue.cvss_temporal
|
5
|
-
issue.cvss_temporal_vector
|
6
|
-
issue.cvss_environmental
|
7
|
-
issue.cvss_environmental_vector
|
8
|
-
issue.finding
|
9
|
-
issue.impact
|
10
|
-
issue.ease
|
11
|
-
issue.nipperv1_ease
|
12
|
-
issue.nipperv1_fix
|
13
|
-
issue.nipperv1_impact
|
14
|
-
issue.nipperv1_rating
|
15
|
-
issue.recommendation
|
data/templates/issue.template
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
#[Title]#
|
2
|
-
%issue.title%
|
3
|
-
|
4
|
-
#[CVSSv2.Base]#
|
5
|
-
%issue.cvss_base%
|
6
|
-
|
7
|
-
#[CVSSv2.Temporal]#
|
8
|
-
%issue.cvss_temporal%
|
9
|
-
|
10
|
-
#[CVSSv2.Environmental]#
|
11
|
-
%issue.cvss_environmental%
|
12
|
-
|
13
|
-
#[Finding]#
|
14
|
-
%issue.finding%
|
15
|
-
|
16
|
-
#[Impact]#
|
17
|
-
%issue.impact%
|
18
|
-
|
19
|
-
#[Ease]#
|
20
|
-
%issue.ease%
|
21
|
-
|
22
|
-
#[Nipperv1.Ease]#
|
23
|
-
%issue.nipperv1_ease%
|
24
|
-
|
25
|
-
#[Nipperv1.Fix]#
|
26
|
-
%issue.nipperv1_fix%
|
27
|
-
|
28
|
-
#[Nipperv1.Impact]#
|
29
|
-
%issue.nipperv1_impact%
|
30
|
-
|
31
|
-
#[Nipperv1.Rating]#
|
32
|
-
%issue.nipperv1_rating%
|
33
|
-
|
34
|
-
#[Recommendation]#
|
35
|
-
%issue.recommendation%
|