dradis-saint 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 +12 -3
- data/CHANGELOG.md +7 -0
- data/README.md +3 -4
- data/lib/dradis/plugins/saint/gem_version.rb +1 -1
- data/lib/dradis/plugins/saint/importer.rb +2 -2
- data/lib/dradis/plugins/saint/mapping.rb +55 -0
- data/lib/dradis/plugins/saint.rb +1 -0
- metadata +7 -10
- data/templates/evidence.fields +0 -5
- data/templates/evidence.template +0 -14
- data/templates/vulnerability.fields +0 -14
- data/templates/vulnerability.template +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c046f7a52c587c2ebdcaffc1928118b21d78139373693395e0718dd88b9f8e3
|
4
|
+
data.tar.gz: 87c780f3a7b04df73c766c51265b42dce7ea35a91e37d11232bb860c0a50198b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd85b802e8ebb9356fb7eef16253cfa282bad383dfd1f443d9798c6addfd662ce5b094aaf29d50aec32bacf528edd09edec733f5751e5344b49d52a55a81426
|
7
|
+
data.tar.gz: cb9695ca477bf3b3f73dbeb1013bf32dfa71279b6aed38973bab962736f9d0e311eb20784b6ab5d74c0032a8d5a5b8d8719cb613f168c5fdbcebb77310f3a98e
|
@@ -1,3 +1,5 @@
|
|
1
|
+
Please review [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md) and remove this line.
|
2
|
+
|
1
3
|
### Summary
|
2
4
|
|
3
5
|
Provide a general description of the code changes in your pull
|
@@ -6,6 +8,11 @@ these bugs have open GitHub issues, be sure to tag them here as well,
|
|
6
8
|
to keep the conversation linked together.
|
7
9
|
|
8
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
|
+
|
9
16
|
### Other Information
|
10
17
|
|
11
18
|
If there's anything else that's important and relevant to your pull
|
@@ -26,11 +33,13 @@ products, we must have the copyright associated with the entire
|
|
26
33
|
codebase. Any code you create which is merged must be owned by us.
|
27
34
|
That's not us trying to be a jerks, that's just the way it works.
|
28
35
|
|
29
|
-
Please review the [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/master/CONTRIBUTING.md)
|
30
|
-
file for the details.
|
31
|
-
|
32
36
|
You can delete this section, but the following sentence needs to
|
33
37
|
remain in the PR's description:
|
34
38
|
|
35
39
|
> I assign all rights, including copyright, to any future Dradis
|
36
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,17 +2,16 @@
|
|
2
2
|
|
3
3
|
This add-on will enable the user to upload Saint 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
|
|
10
|
-
See the Dradis Framework's [README.md](https://github.com/dradis/dradis-ce/blob/
|
9
|
+
See the Dradis Framework's [README.md](https://github.com/dradis/dradis-ce/blob/develop/README.md)
|
11
10
|
|
12
11
|
|
13
12
|
## Contributing
|
14
13
|
|
15
|
-
See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/
|
14
|
+
See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md)
|
16
15
|
|
17
16
|
|
18
17
|
## License
|
@@ -66,7 +66,7 @@ module Dradis::Plugins::Saint
|
|
66
66
|
issue_plugin_id = Digest::SHA1.hexdigest(evidence_desc)
|
67
67
|
issue = @issues[issue_plugin_id]
|
68
68
|
|
69
|
-
evidence_text =
|
69
|
+
evidence_text = mapping_service.apply_mapping(source: 'evidence', data: xml_evidence)
|
70
70
|
|
71
71
|
if issue
|
72
72
|
# Create Dradis evidence
|
@@ -109,7 +109,7 @@ module Dradis::Plugins::Saint
|
|
109
109
|
logger.info{ "\t\t => Creating new issue..." }
|
110
110
|
plugin_id = Digest::SHA1.hexdigest(element_desc)
|
111
111
|
|
112
|
-
issue_text =
|
112
|
+
issue_text = mapping_service.apply_mapping(source: 'vulnerability', data: xml_vuln)
|
113
113
|
issue = content_service.create_issue(text: issue_text, id: plugin_id)
|
114
114
|
else
|
115
115
|
# Create Note in Host
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Dradis::Plugins::Saint
|
2
|
+
module Mapping
|
3
|
+
DEFAULT_MAPPING = {
|
4
|
+
evidence: {
|
5
|
+
'Port' => '{{ saint[evidence.port] }}',
|
6
|
+
'Severity' => '{{ saint[evidence.severity] }}',
|
7
|
+
'Class' => '{{ saint[evidence.class] }}',
|
8
|
+
'cve' => '{{ saint[evidence.cve] }}',
|
9
|
+
'CVSS Base Score' => '{{ saint[evidence.cvss_base_score] }}'
|
10
|
+
},
|
11
|
+
vulnerability: {
|
12
|
+
'Title' => '{{ saint[vulnerability.description] }}',
|
13
|
+
'Host Name' => '{{ saint[vulnerability.hostname] }}',
|
14
|
+
'IP Address' => '{{ saint[vulnerability.ipaddr] }}',
|
15
|
+
'Host Type' => '{{ saint[vulnerability.hosttype] }}',
|
16
|
+
'Scan Time' => '{{ saint[vulnerability.scan_time] }}',
|
17
|
+
'Status' => '{{ saint[vulnerability.status] }}',
|
18
|
+
'Severity' => '{{ saint[vulnerability.severity] }}',
|
19
|
+
'CVE' => '{{ saint[vulnerability.cve] }}',
|
20
|
+
'CVSS Base Score' => '{{ saint[vulnerability.cvss_base_score] }}',
|
21
|
+
'Impact' => '{{ saint[vulnerability.impact] }}',
|
22
|
+
'Background' => '{{ saint[vulnerability.background] }}',
|
23
|
+
'Problem' => '{{ saint[vulnerability.problem] }}',
|
24
|
+
'Resolution' => '{{ saint[vulnerability.resolution] }}',
|
25
|
+
'Reference' => '{{ saint[vulnerability.reference] }}'
|
26
|
+
}
|
27
|
+
}.freeze
|
28
|
+
|
29
|
+
SOURCE_FIELDS = {
|
30
|
+
evidence: [
|
31
|
+
'evidence.port',
|
32
|
+
'evidence.severity',
|
33
|
+
'evidence.class',
|
34
|
+
'evidence.cve',
|
35
|
+
'evidence.cvss_base_score'
|
36
|
+
],
|
37
|
+
vulnerability: [
|
38
|
+
'vulnerability.description',
|
39
|
+
'vulnerability.hostname',
|
40
|
+
'vulnerability.ipaddr',
|
41
|
+
'vulnerability.hosttype',
|
42
|
+
'vulnerability.scan_time',
|
43
|
+
'vulnerability.status',
|
44
|
+
'vulnerability.severity',
|
45
|
+
'vulnerability.cve',
|
46
|
+
'vulnerability.cvss_base_score',
|
47
|
+
'vulnerability.impact',
|
48
|
+
'vulnerability.background',
|
49
|
+
'vulnerability.problem',
|
50
|
+
'vulnerability.resolution',
|
51
|
+
'vulnerability.reference'
|
52
|
+
]
|
53
|
+
}.freeze
|
54
|
+
end
|
55
|
+
end
|
data/lib/dradis/plugins/saint.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dradis-saint
|
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:
|
11
|
+
date: 2024-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dradis-plugins
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: This add-on allows you to upload and parse reports from Saint.
|
98
|
-
email:
|
98
|
+
email:
|
99
99
|
executables: []
|
100
100
|
extensions: []
|
101
101
|
extra_rdoc_files: []
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/dradis/plugins/saint/field_processor.rb
|
118
118
|
- lib/dradis/plugins/saint/gem_version.rb
|
119
119
|
- lib/dradis/plugins/saint/importer.rb
|
120
|
+
- lib/dradis/plugins/saint/mapping.rb
|
120
121
|
- lib/dradis/plugins/saint/version.rb
|
121
122
|
- lib/saint/base.rb
|
122
123
|
- lib/saint/evidence.rb
|
@@ -134,17 +135,13 @@ files:
|
|
134
135
|
- spec/saint/vulnerability_spec.rb
|
135
136
|
- spec/spec_helper.rb
|
136
137
|
- spec/xml_element.rb
|
137
|
-
- templates/evidence.fields
|
138
138
|
- templates/evidence.sample
|
139
|
-
- templates/evidence.template
|
140
|
-
- templates/vulnerability.fields
|
141
139
|
- templates/vulnerability.sample
|
142
|
-
- templates/vulnerability.template
|
143
140
|
homepage: https://dradis.com/integrations/saint.html
|
144
141
|
licenses:
|
145
142
|
- GPL-2
|
146
143
|
metadata: {}
|
147
|
-
post_install_message:
|
144
|
+
post_install_message:
|
148
145
|
rdoc_options: []
|
149
146
|
require_paths:
|
150
147
|
- lib
|
@@ -160,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
157
|
version: '0'
|
161
158
|
requirements: []
|
162
159
|
rubygems_version: 3.1.4
|
163
|
-
signing_key:
|
160
|
+
signing_key:
|
164
161
|
specification_version: 4
|
165
162
|
summary: Saint upload add-on for Dradis Framework.
|
166
163
|
test_files: []
|
data/templates/evidence.fields
DELETED
data/templates/evidence.template
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
vulnerability.description
|
2
|
-
vulnerability.hostname
|
3
|
-
vulnerability.ipaddr
|
4
|
-
vulnerability.hosttype
|
5
|
-
vulnerability.scan_time
|
6
|
-
vulnerability.status
|
7
|
-
vulnerability.severity
|
8
|
-
vulnerability.cve
|
9
|
-
vulnerability.cvss_base_score
|
10
|
-
vulnerability.impact
|
11
|
-
vulnerability.background
|
12
|
-
vulnerability.problem
|
13
|
-
vulnerability.resolution
|
14
|
-
vulnerability.reference
|
@@ -1,41 +0,0 @@
|
|
1
|
-
#[Title]#
|
2
|
-
%vulnerability.description%
|
3
|
-
|
4
|
-
#[Host Name]#
|
5
|
-
%vulnerability.hostname%
|
6
|
-
|
7
|
-
#[IP Address]#
|
8
|
-
%vulnerability.ipaddr%
|
9
|
-
|
10
|
-
#[Host Type]#
|
11
|
-
%vulnerability.hosttype%
|
12
|
-
|
13
|
-
#[Scan Time]#
|
14
|
-
%vulnerability.scan_time%
|
15
|
-
|
16
|
-
#[Status]#
|
17
|
-
%vulnerability.status%
|
18
|
-
|
19
|
-
#[Severity]#
|
20
|
-
%vulnerability.severity%
|
21
|
-
|
22
|
-
#[CVE]#
|
23
|
-
%vulnerability.cve%
|
24
|
-
|
25
|
-
#[CVSS Base Score]#
|
26
|
-
%vulnerability.cvss_base_score%
|
27
|
-
|
28
|
-
#[Impact]#
|
29
|
-
%vulnerability.impact%
|
30
|
-
|
31
|
-
#[Background]#
|
32
|
-
%vulnerability.background%
|
33
|
-
|
34
|
-
#[Problem]#
|
35
|
-
%vulnerability.problem%
|
36
|
-
|
37
|
-
#[Resolution]#
|
38
|
-
%vulnerability.resolution%
|
39
|
-
|
40
|
-
#[Reference]#
|
41
|
-
%vulnerability.reference%
|