dradis-saint 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 826649b4a2c785d48f12e230ff19a375cdb6a085a1636de3b2fa3a0abf9e3db7
4
- data.tar.gz: 49898db92b4078acaeeb6a01829f68081f6d95689b49bc503c1bfbc083b23d9c
3
+ metadata.gz: 3c046f7a52c587c2ebdcaffc1928118b21d78139373693395e0718dd88b9f8e3
4
+ data.tar.gz: 87c780f3a7b04df73c766c51265b42dce7ea35a91e37d11232bb860c0a50198b
5
5
  SHA512:
6
- metadata.gz: fb698a8aa3cd56a73677043030de1b676c304e43b3b1df5a25dd3128b15185182dd676a1234a1d7b56540399e807c45982a1008a9cd8655b6cd0653285b329a5
7
- data.tar.gz: 92767cf106d1c41bd57b9fc67fbcbe6ef414a0378938fb3a010ad9dfd37db15ed97666591a2c614033b7d9f8a7036f9c7223d72946cc4b75118dec35366c8563
6
+ metadata.gz: ddd85b802e8ebb9356fb7eef16253cfa282bad383dfd1f443d9798c6addfd662ce5b094aaf29d50aec32bacf528edd09edec733f5751e5344b49d52a55a81426
7
+ data.tar.gz: cb9695ca477bf3b3f73dbeb1013bf32dfa71279b6aed38973bab962736f9d0e311eb20784b6ab5d74c0032a8d5a5b8d8719cb613f168c5fdbcebb77310f3a98e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ v4.12.0 (May 2024)
2
+ - Update Dradis links in README
3
+ - Migrate integration to use Mappings Manager
4
+
1
5
  v4.11.0 (January 2024)
2
6
  - No changes
3
7
 
data/README.md CHANGED
@@ -2,8 +2,7 @@
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 higher.
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
 
@@ -7,7 +7,7 @@ module Dradis
7
7
 
8
8
  module VERSION
9
9
  MAJOR = 4
10
- MINOR = 11
10
+ MINOR = 12
11
11
  TINY = 0
12
12
  PRE = nil
13
13
 
@@ -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 = template_service.process_template(template: 'evidence', data: xml_evidence)
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 = template_service.process_template(template: 'vulnerability', data: xml_vuln)
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
@@ -7,5 +7,6 @@ end
7
7
 
8
8
  require 'dradis/plugins/saint/engine'
9
9
  require 'dradis/plugins/saint/field_processor'
10
+ require 'dradis/plugins/saint/mapping'
10
11
  require 'dradis/plugins/saint/importer'
11
12
  require 'dradis/plugins/saint/version'
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.11.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-17 00:00:00.000000000 Z
11
+ date: 2024-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -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,12 +135,8 @@ 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
@@ -159,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
156
  - !ruby/object:Gem::Version
160
157
  version: '0'
161
158
  requirements: []
162
- rubygems_version: 3.3.7
159
+ rubygems_version: 3.1.4
163
160
  signing_key:
164
161
  specification_version: 4
165
162
  summary: Saint upload add-on for Dradis Framework.
@@ -1,5 +0,0 @@
1
- evidence.port
2
- evidence.severity
3
- evidence.class
4
- evidence.cve
5
- evidence.cvss_base_score
@@ -1,14 +0,0 @@
1
- #[Port]#
2
- %evidence.port%
3
-
4
- #[Severity]#
5
- %evidence.severity%
6
-
7
- #[Class]#
8
- %evidence.class%
9
-
10
- #[cve]#
11
- %evidence.cve%
12
-
13
- #[CVSS Base Score]#
14
- %evidence.cvss_base_score%
@@ -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%