dradis-qualys 4.11.0 → 4.13.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
  SHA256:
3
- metadata.gz: 07eda0c6a5954e3c931b298b39398d410a58f3799b9ef93da484d92152507cac
4
- data.tar.gz: bf52cbbff50c82a8c8c0841a80236923c0fbdf0f02114c0a815c1e176802c17f
3
+ metadata.gz: 4f3373b9590de106125901799d0b3efd5fa6f38609d3cb5c7c29b80601e506f3
4
+ data.tar.gz: aa14cfc1ffa7cfd4de8250cfb5c5a563ccf081dd976c62f8932bf95883f2bcd0
5
5
  SHA512:
6
- metadata.gz: 4992bfc707a72857b9d94443bf5661139fe61f5abc168dff49ccdee04ff98e40abebfef3bdd2daebe5ff8006139639807fa27bee722ac869bc0a5ef5f213799d
7
- data.tar.gz: 473ca19f10c043537b693d3c9b44afccb141ee6e66acfdd68f885ac66fd61022cc1abbeab4f8b4dc24731a3825f0f3266e3b58b2ac734604b454d410bf075737
6
+ metadata.gz: 2aac0d99d560f5a2e2b4a772efcde344044d785b7e40c60133d49d528f9b5938eb67402191fe3267937f92303ae56f7e326ce1c9c46d3e4aa5d83de4b24b58bd
7
+ data.tar.gz: 50a07ff081b22723cde3e841d89436a8f03b63842bcbbe6d47df5eb9f94f9dac584d74bf06d42a13e3347f711560e38e10ba888f73123d5b94d1a39c72234853
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ v4.13.0 (July 2024)
2
+ - No changes
3
+
4
+ v4.12.0 (May 2024)
5
+ - Update Dradis links in README
6
+ - Migrate integration to use Mappings Manager
7
+ - Update template names to include uploader
8
+
1
9
  v4.11.0 (January 2023)
2
10
  - Add support for the output for Qualys WAS API 3.13 and later
3
11
 
data/README.md CHANGED
@@ -4,8 +4,7 @@
4
4
 
5
5
  Upload Qualys files into Dradis.
6
6
 
7
- The add-on requires [Dradis CE](https://dradisframework.org/) > 3.0, or [Dradis Pro](https://dradisframework.com/pro/).
8
-
7
+ The add-on requires [Dradis CE](https://dradis.com/ce/) > 3.0, or [Dradis Pro](https://dradis.com/).
9
8
 
10
9
 
11
10
  ## More information
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'dradis-plugins', '~> 4.0'
27
27
  spec.add_dependency 'nokogiri', '~> 1.3'
28
28
 
29
- spec.add_development_dependency 'bundler', '~> 1.6'
29
+ spec.add_development_dependency 'bundler', '~> 2.0'
30
30
  spec.add_development_dependency 'rake', '~> 10.0'
31
31
  spec.add_development_dependency 'rspec-rails'
32
32
  spec.add_development_dependency 'combustion', '~> 0.5.2'
@@ -13,7 +13,7 @@ module Dradis::Plugins::Qualys
13
13
 
14
14
  class Importer < Dradis::Plugins::Upload::Importer
15
15
  def self.templates
16
- { evidence: 'asset-evidence', issue: 'asset-issue' }
16
+ { evidence: 'asset_evidence', issue: 'asset_issue' }
17
17
  end
18
18
 
19
19
  def initialize(args={})
@@ -86,7 +86,7 @@ module Dradis::Plugins::Qualys
86
86
  def process_issue(xml_vuln)
87
87
  qid = xml_vuln.at_xpath('QID').text
88
88
  logger.info { "\t => Creating new issue (plugin_id: #{ qid })" }
89
- issue_text = template_service.process_template(template: 'asset-issue', data: xml_vuln)
89
+ issue_text = mapping_service.apply_mapping(source: 'asset_issue', data: xml_vuln)
90
90
  issue = content_service.create_issue(text: issue_text, id: qid)
91
91
 
92
92
  issue_lookup[qid.to_i] = issue
@@ -107,7 +107,7 @@ module Dradis::Plugins::Qualys
107
107
  return
108
108
  end
109
109
 
110
- evidence_content = template_service.process_template(template: 'asset-evidence', data: xml_evidence)
110
+ evidence_content = mapping_service.apply_mapping(source: 'asset_evidence', data: xml_evidence)
111
111
  content_service.create_evidence(issue: issue, node: node, content: evidence_content)
112
112
  end
113
113
  end
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 11
11
+ MINOR = 13
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -0,0 +1,137 @@
1
+ module Dradis::Plugins::Qualys
2
+ module Mapping
3
+ DEFAULT_MAPPING = {
4
+ asset_evidence: {
5
+ 'Result' => '{{ qualys[asset-evidence.result] }}',
6
+ 'Status' => '{{ qualys[asset-evidence.vuln_status] }}',
7
+ 'SSL' => '{{ qualys[asset-evidence.ssl] }}',
8
+ 'CVSSv3.Final' => '{{ qualys[asset-evidence.cvss_final] }}'
9
+ },
10
+ asset_issue: {
11
+ 'Title' => '{{ qualys[asset-issue.title] }}',
12
+ 'Severity' => '{{ qualys[asset-issue.severity] }}',
13
+ 'Categories' => 'Category: {{ qualys[asset-issue.category] }}',
14
+ 'CVSSv3.BaseScore' => '{{ qualys[asset-issue.cvss3_base] }}',
15
+ 'CVSSv3.TemporalScore' => '{{ qualys[asset-issue.cvss3_temporal] }}',
16
+ 'Threat' => '{{ qualys[asset-issue.threat] }}',
17
+ 'Impact' => '{{ qualys[asset-issue.impact] }}',
18
+ 'Solution' => '{{ qualys[asset-issue.solution] }}'
19
+ },
20
+ vuln_element: {
21
+ 'Title' => '{{ qualys[element.title] }}',
22
+ 'CVSSv3.BaseScore' => '{{ qualys[element.cvss_base] }}',
23
+ 'CVSSv3.Vector' => 'Temporal score: {{ qualys[element.cvss_temporal] }}',
24
+ 'Type' => 'External',
25
+ 'Description' => "{{ qualys[element.diagnosis] }}\n{{ qualys[element.consequence] }}",
26
+ 'Solution' => '{{ qualys[element.solution] }}',
27
+ 'References' => '{{ qualys[element.vendor_reference_list] }}',
28
+ },
29
+ vuln_evidence: {
30
+ 'Location' => "{{ qualys[evidence.cat_protocol] }}/{{ qualys[evidence.cat_port] }}",
31
+ 'Output' => '{{ qualys[evidence.result] }}'
32
+ },
33
+ was_evidence: {
34
+ 'Location' => '{{ qualys[was-evidence.url] }}',
35
+ 'Output' => "*Request*\n\nMethod: {{ qualys[was-evidence.request_method] }}\nURL: {{ qualys[was-evidence.request_url] }}\n\nbc.. {{ qualys[was-evidence.request_headers] }}\n\np. *Response*\n\nEvidence: {{ qualys[was-evidence.response_evidence] }}\n\nbc.. {{ qualys[was-evidence.response_contents] }}"
36
+ },
37
+ was_issue: {
38
+ 'Title' => '{{ qualys[was-issue.title] }}',
39
+ 'Severity' => '{{ qualys[was-issue.severity] }}',
40
+ 'Categories' => "Category: {{ qualys[was-issue.category] }}\nGroup: {{ qualys[was-issue.group] }}\nOWASP: {{ qualys[was-issue.owasp] }}\nCWE: {{ qualys[was-issue.cwe] }}",
41
+ 'CVSSv3.Vector' => '{{ qualys[was-issue.cvss3_vector] }}',
42
+ 'CVSSv3.BaseScore' => '{{ qualys[was-issue.cvss3_base] }}',
43
+ 'CVSSv3.TemporalScore' => '{{ qualys[was-issue.cvss3_temporal] }}',
44
+ 'Description' => "{{ qualys[was-issue.description] }}\n\n{{ qualys[was-issue.impact] }}",
45
+ 'Solution' => '{{ qualys[was-issue.solution] }}'
46
+ }
47
+ }.freeze
48
+
49
+ SOURCE_FIELDS = {
50
+ asset_evidence: [
51
+ 'asset-evidence.cvss3_final',
52
+ 'asset-evidence.cvss_final',
53
+ 'asset-evidence.first_found',
54
+ 'asset-evidence.last_found',
55
+ 'asset-evidence.result',
56
+ 'asset-evidence.ssl',
57
+ 'asset-evidence.times_found',
58
+ 'asset-evidence.type',
59
+ 'asset-evidence.vuln_status'
60
+ ],
61
+ asset_issue: [
62
+ 'asset-issue.category',
63
+ 'asset-issue.cvss3_base',
64
+ 'asset-issue.cvss3_temporal',
65
+ 'asset-issue.cvss_base',
66
+ 'asset-issue.cvss_temporal',
67
+ 'asset-issue.impact',
68
+ 'asset-issue.last_update',
69
+ 'asset-issue.pci_flag',
70
+ 'asset-issue.qid',
71
+ 'asset-issue.result',
72
+ 'asset-issue.severity',
73
+ 'asset-issue.solution',
74
+ 'asset-issue.threat',
75
+ 'asset-issue.title'
76
+ ],
77
+ vuln_element: [
78
+ 'element.number',
79
+ 'element.severity',
80
+ 'element.cveid',
81
+ 'element.title',
82
+ 'element.last_update',
83
+ 'element.cvss_base',
84
+ 'element.cvss_temporal',
85
+ 'element.pci_flag',
86
+ 'element.vendor_reference_list',
87
+ 'element.cve_id_list',
88
+ 'element.bugtraq_id_list',
89
+ 'element.diagnosis',
90
+ 'element.consequence',
91
+ 'element.solution',
92
+ 'element.compliance',
93
+ 'element.result',
94
+ 'element.qualys_collection'
95
+ ],
96
+ vuln_evidence: [
97
+ 'evidence.cat_fqdn',
98
+ 'evidence.cat_misc',
99
+ 'evidence.cat_port',
100
+ 'evidence.cat_protocol',
101
+ 'evidence.cat_value',
102
+ 'evidence.result'
103
+ ],
104
+ was_evidence: [
105
+ 'was-evidence.access_paths',
106
+ 'was-evidence.ajax',
107
+ 'was-evidence.authentication',
108
+ 'was-evidence.ignored',
109
+ 'was-evidence.potential',
110
+ 'was-evidence.request_headers',
111
+ 'was-evidence.request_method',
112
+ 'was-evidence.request_url',
113
+ 'was-evidence.response_contents',
114
+ 'was-evidence.response_evidence',
115
+ 'was-evidence.url'
116
+ ],
117
+ was_issue: [
118
+ 'was-issue.category',
119
+ 'was-issue.cvss_base',
120
+ 'was-issue.cvss_temporal',
121
+ 'was-issue.cvss3_base',
122
+ 'was-issue.cvss3_temporal',
123
+ 'was-issue.cvss3_vector',
124
+ 'was-issue.cwe',
125
+ 'was-issue.description',
126
+ 'was-issue.group',
127
+ 'was-issue.impact',
128
+ 'was-issue.owasp',
129
+ 'was-issue.qid',
130
+ 'was-issue.severity',
131
+ 'was-issue.solution',
132
+ 'was-issue.title',
133
+ 'was-issue.wasc'
134
+ ]
135
+ }.freeze
136
+ end
137
+ end
@@ -14,7 +14,7 @@ module Dradis::Plugins::Qualys
14
14
  attr_accessor :host_node
15
15
 
16
16
  def self.templates
17
- { evidence: 'evidence', issue: 'element' }
17
+ { evidence: 'vuln_evidence', issue: 'vuln_element' }
18
18
  end
19
19
 
20
20
  def initialize(args={})
@@ -95,11 +95,11 @@ module Dradis::Plugins::Qualys
95
95
  # Issue and Evidence template out of it.
96
96
  def process_vuln(vuln_number, xml_cat)
97
97
  logger.info{ "\t\t => Creating new issue (plugin_id: #{ vuln_number })" }
98
- issue_text = template_service.process_template(template: 'element', data: xml_cat)
98
+ issue_text = mapping_service.apply_mapping(source: 'vuln_element', data: xml_cat)
99
99
  issue = content_service.create_issue(text: issue_text, id: vuln_number)
100
100
 
101
101
  logger.info{ "\t\t => Creating new evidence" }
102
- evidence_content = template_service.process_template(template: 'evidence', data: xml_cat)
102
+ evidence_content = mapping_service.apply_mapping(source: 'vuln_evidence', data: xml_cat)
103
103
  content_service.create_evidence(issue: issue, node: self.host_node, content: evidence_content)
104
104
  end
105
105
  end
@@ -13,7 +13,7 @@ module Dradis::Plugins::Qualys
13
13
 
14
14
  class Importer < Dradis::Plugins::Upload::Importer
15
15
  def self.templates
16
- { evidence: 'was-evidence', issue: 'was-issue' }
16
+ { evidence: 'was_evidence', issue: 'was_issue' }
17
17
  end
18
18
 
19
19
  def initialize(args = {})
@@ -82,14 +82,14 @@ module Dradis::Plugins::Qualys
82
82
  return
83
83
  end
84
84
 
85
- evidence_content = template_service.process_template(template: 'was-evidence', data: xml_vulnerability)
85
+ evidence_content = mapping_service.apply_mapping(source: 'was_evidence', data: xml_vulnerability)
86
86
  content_service.create_evidence(issue: issue, node: webapp_node, content: evidence_content)
87
87
  end
88
88
 
89
89
  def process_issue(xml_qid)
90
90
  qid = xml_qid.at_xpath('QID').text
91
91
  logger.info { "\t => Creating new issue (plugin_id: #{ qid })" }
92
- issue_text = template_service.process_template(template: 'was-issue', data: xml_qid)
92
+ issue_text = mapping_service.apply_mapping(source: 'was_issue', data: xml_qid)
93
93
  issue = content_service.create_issue(text: issue_text, id: qid)
94
94
 
95
95
  issue_lookup[qid.to_i] = issue
@@ -7,6 +7,7 @@ end
7
7
 
8
8
  require 'dradis/plugins/qualys/engine'
9
9
  require 'dradis/plugins/qualys/field_processor'
10
+ require 'dradis/plugins/qualys/mapping'
10
11
  require 'dradis/plugins/qualys/version'
11
12
 
12
13
  require 'dradis/plugins/qualys/asset/importer'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-qualys
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.0
4
+ version: 4.13.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-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.6'
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.6'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -119,6 +119,7 @@ files:
119
119
  - lib/dradis/plugins/qualys/engine.rb
120
120
  - lib/dradis/plugins/qualys/field_processor.rb
121
121
  - lib/dradis/plugins/qualys/gem_version.rb
122
+ - lib/dradis/plugins/qualys/mapping.rb
122
123
  - lib/dradis/plugins/qualys/version.rb
123
124
  - lib/dradis/plugins/qualys/vuln/importer.rb
124
125
  - lib/dradis/plugins/qualys/was/importer.rb
@@ -142,24 +143,12 @@ files:
142
143
  - spec/qualys/was/importer_spec.rb
143
144
  - spec/spec_helper.rb
144
145
  - spec/support/spec_macros.rb
145
- - templates/asset-evidence.fields
146
- - templates/asset-evidence.sample
147
- - templates/asset-evidence.template
148
- - templates/asset-issue.fields
149
- - templates/asset-issue.sample
150
- - templates/asset-issue.template
151
- - templates/element.fields
152
- - templates/element.sample
153
- - templates/element.template
154
- - templates/evidence.fields
155
- - templates/evidence.sample
156
- - templates/evidence.template
157
- - templates/was-evidence.fields
158
- - templates/was-evidence.sample
159
- - templates/was-evidence.template
160
- - templates/was-issue.fields
161
- - templates/was-issue.sample
162
- - templates/was-issue.template
146
+ - templates/asset_evidence.sample
147
+ - templates/asset_issue.sample
148
+ - templates/vuln_element.sample
149
+ - templates/vuln_evidence.sample
150
+ - templates/was_evidence.sample
151
+ - templates/was_issue.sample
163
152
  homepage: https://dradis.com/integrations/qualys.html
164
153
  licenses:
165
154
  - GPL-2
@@ -179,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
168
  - !ruby/object:Gem::Version
180
169
  version: '0'
181
170
  requirements: []
182
- rubygems_version: 3.3.7
171
+ rubygems_version: 3.5.6
183
172
  signing_key:
184
173
  specification_version: 4
185
174
  summary: Qualys add-on for the Dradis Framework.
@@ -1,9 +0,0 @@
1
- asset-evidence.cvss3_final
2
- asset-evidence.cvss_final
3
- asset-evidence.first_found
4
- asset-evidence.last_found
5
- asset-evidence.result
6
- asset-evidence.ssl
7
- asset-evidence.times_found
8
- asset-evidence.type
9
- asset-evidence.vuln_status
@@ -1,11 +0,0 @@
1
- #[Result]#
2
- %asset-evidence.result%
3
-
4
- #[Status]#
5
- %asset-evidence.vuln_status%
6
-
7
- #[SSL]#
8
- %asset-evidence.ssl%
9
-
10
- #[CVSSv3.Final]#
11
- %asset-evidence.cvss_final%
@@ -1,14 +0,0 @@
1
- asset-issue.category
2
- asset-issue.cvss3_base
3
- asset-issue.cvss3_temporal
4
- asset-issue.cvss_base
5
- asset-issue.cvss_temporal
6
- asset-issue.impact
7
- asset-issue.last_update
8
- asset-issue.pci_flag
9
- asset-issue.qid
10
- asset-issue.result
11
- asset-issue.severity
12
- asset-issue.solution
13
- asset-issue.threat
14
- asset-issue.title
@@ -1,22 +0,0 @@
1
- #[Title]#
2
- %asset-issue.title%
3
-
4
- #[Severity]#
5
- %asset-issue.severity%
6
-
7
- #[Categories]#
8
- Category: %asset-issue.category%
9
-
10
- #[CVSSv3.BaseScore]#
11
- %asset-issue.cvss3_base%
12
-
13
- #[CVSSv3.TemporalScore]#
14
- %asset-issue.cvss3_temporal%
15
-
16
- #[Threat]#
17
- %asset-issue.threat%
18
-
19
- %asset-issue.impact%
20
-
21
- #[Solution]#
22
- %asset-issue.solution%
@@ -1,17 +0,0 @@
1
- element.number
2
- element.severity
3
- element.cveid
4
- element.title
5
- element.last_update
6
- element.cvss_base
7
- element.cvss_temporal
8
- element.pci_flag
9
- element.vendor_reference_list
10
- element.cve_id_list
11
- element.bugtraq_id_list
12
- element.diagnosis
13
- element.consequence
14
- element.solution
15
- element.compliance
16
- element.result
17
- element.qualys_collection
@@ -1,39 +0,0 @@
1
- #[Title]#
2
- %element.title%
3
-
4
-
5
- #[Severity]#
6
- %element.severity%
7
-
8
-
9
- #[CVE]#
10
- %element.cveid%
11
-
12
-
13
- #[CVSS]#
14
- Base: %element.cvss_base%
15
- Temporal: %element.cvss_temporal%
16
-
17
-
18
- #[Diagnosis]#
19
- %element.diagnosis%
20
-
21
-
22
- #[Consequence]#
23
- %element.consequence%
24
-
25
-
26
- #[Solution]#
27
- %element.solution%
28
-
29
-
30
- #[Result]#
31
- %element.result%
32
-
33
-
34
- #[CVEList]#
35
- %element.cve_id_list%
36
-
37
-
38
- #[QualysCollection]#
39
- %element.qualys_collection%
@@ -1,6 +0,0 @@
1
- evidence.cat_fqdn
2
- evidence.cat_misc
3
- evidence.cat_port
4
- evidence.cat_protocol
5
- evidence.cat_value
6
- evidence.result
@@ -1,11 +0,0 @@
1
- #[Category]#
2
- %evidence.cat_value%
3
-
4
- #[Protocol]#
5
- %evidence.cat_protocol%
6
-
7
- #[Port]#
8
- %evidence.cat_port%
9
-
10
- #[Output]#
11
- %evidence.result%
@@ -1,11 +0,0 @@
1
- was-evidence.access_paths
2
- was-evidence.ajax
3
- was-evidence.authentication
4
- was-evidence.ignored
5
- was-evidence.potential
6
- was-evidence.request_headers
7
- was-evidence.request_method
8
- was-evidence.request_url
9
- was-evidence.response_contents
10
- was-evidence.response_evidence
11
- was-evidence.url
@@ -1,16 +0,0 @@
1
- #[Location]#
2
- %was-evidence.url%
3
-
4
- #[Output]#
5
- *Request*
6
-
7
- Method: %was-evidence.request_method%
8
- URL: %was-evidence.request_url%
9
-
10
- bc.. %was-evidence.request_headers%
11
-
12
- p. *Response*
13
-
14
- Evidence: %was-evidence.response_evidence%
15
-
16
- bc.. %was-evidence.response_contents%
@@ -1,16 +0,0 @@
1
- was-issue.category
2
- was-issue.cvss_base
3
- was-issue.cvss_temporal
4
- was-issue.cvss3_base
5
- was-issue.cvss3_temporal
6
- was-issue.cvss3_vector
7
- was-issue.cwe
8
- was-issue.description
9
- was-issue.group
10
- was-issue.impact
11
- was-issue.owasp
12
- was-issue.qid
13
- was-issue.severity
14
- was-issue.solution
15
- was-issue.title
16
- was-issue.wasc
@@ -1,28 +0,0 @@
1
- #[Title]#
2
- %was-issue.title%
3
-
4
- #[Severity]#
5
- %was-issue.severity%
6
-
7
- #[Categories]#
8
- Category: %was-issue.category%
9
- Group: %was-issue.group%
10
- OWASP: %was-issue.owasp%
11
- CWE: %was-issue.cwe%
12
-
13
- #[CVSSv3.Vector]#
14
- %was-issue.cvss3_vector%
15
-
16
- #[CVSSv3.BaseScore]#
17
- %was-issue.cvss3_base%
18
-
19
- #[CVSSv3.TemporalScore]#
20
- %was-issue.cvss3_temporal%
21
-
22
- #[Description]#
23
- %was-issue.description%
24
-
25
- %was-issue.impact%
26
-
27
- #[Solution]#
28
- %was-issue.solution%
File without changes
File without changes