dradis-openvas 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56300ef970e155017d685e4970cf3b75725d399770a97ef0e5eb7631255ee8ad
4
- data.tar.gz: 7e8fec73e811712816262cfdbe41be556159e08f8954a51e0bf2dd1f7bd66140
3
+ metadata.gz: 4fa4fbffa0f998d065c001f81f7ab5186e7f491892898b5be7a2ac2de056d97a
4
+ data.tar.gz: 0facc466254d5984274a65e75f7c3d099bb8615cd5e9f18fdc05e56843440d07
5
5
  SHA512:
6
- metadata.gz: 8ecfa737970116a1752acee94a073efbe5056a35ff5937ae7d334b9cb41c2ac8305f9d87d573bf8c7c3f75ed8cfad3cd0d2188839496e2e6a64e929f1ea91b32
7
- data.tar.gz: 4293b4d34e6b4d06303e35531c4f86e54c3e495da7e0119acbcb594d7807c60a52e0fcbb125d28d0eddc80572b0f11d7ee763a43720c01375c24be83511bb614
6
+ metadata.gz: 3a43b28e4daf9a3d8d68d3dc9e70e91cbe7eedd4e71f9cd64528545dabf7f29482c9ac73733d3d01f6c5cc6729891748ad2176983284845631b90a77c4b2fefb
7
+ data.tar.gz: 1acc1ab81acc196fa9b00651e6c06c870b65a76c82c6784f209ec16aaf02f76f2a8fe3e04c73482f7b0774197e39d6a44f1098d7a619bcb39e6d66960d74bc1f
@@ -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
@@ -1,3 +1,10 @@
1
+ v4.12.0 (May 2024)
2
+ - Migrate integration to use Mappings Manager
3
+ - Update Dradis links in README
4
+
5
+ v4.11.0 (January 2024)
6
+ - No changes
7
+
1
8
  v4.10.0 (September 2023)
2
9
  - Update gemspec links
3
10
 
data/README.md CHANGED
@@ -4,19 +4,19 @@
4
4
 
5
5
  The OpenVAS add-on enables users to upload OpenVAS XML files to create a structure of nodes/notes that contain the same information about the hosts/ports/services as the original file.
6
6
 
7
- The add-on requires [Dradis CE](https://dradisframework.org/) > 3.0, or [Dradis Pro](https://dradisframework.com/pro/).
7
+ The add-on requires [Dradis CE](https://dradis.com/ce/) > 3.0, or [Dradis Pro](https://dradis.com/).
8
8
 
9
9
  The add-on supports OpenVAS v6 and v7 output.
10
10
 
11
11
 
12
12
  ## More information
13
13
 
14
- See the Dradis Framework's [README.md](https://github.com/dradis/dradisframework/blob/master/README.md)
14
+ See the Dradis Framework's [README.md](https://github.com/dradis/dradis-ce/blob/develop/README.md)
15
15
 
16
16
 
17
17
  ## Contributing
18
18
 
19
- See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradisframework/blob/master/CONTRIBUTING.md)
19
+ See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md)
20
20
 
21
21
 
22
22
  ## License
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 10
11
+ MINOR = 12
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -45,7 +45,7 @@ module Dradis::Plugins::OpenVAS
45
45
 
46
46
  logger.info{ "\t\t => Creating new issue (#{nvt_oid})" }
47
47
 
48
- issue_text = template_service.process_template(template: 'result', data: xml_result)
48
+ issue_text = mapping_service.apply_mapping(source: 'result', data: xml_result)
49
49
  issue = content_service.create_issue(text: issue_text, id: nvt_oid)
50
50
 
51
51
 
@@ -90,8 +90,8 @@ module Dradis::Plugins::OpenVAS
90
90
  # doesn't provide any per-instance information.
91
91
  #
92
92
  # Best thing to do is to include the full <description> field and let the user deal with it.
93
-
94
- evidence_content = template_service.process_template(template: 'evidence', data: xml_result)
93
+
94
+ evidence_content = mapping_service.apply_mapping(source: 'evidence', data: xml_result)
95
95
  content_service.create_evidence(issue: issue, node: host_node, content: evidence_content)
96
96
  end
97
97
 
@@ -0,0 +1,49 @@
1
+ module Dradis::Plugins::OpenVAS
2
+ module Mapping
3
+ DEFAULT_MAPPING = {
4
+ evidence: {
5
+ 'Port' => '{{ openvas[evidence.port] }}',
6
+ 'Description' => '{{ openvas[evidence.description] }}'
7
+ },
8
+ result: {
9
+ 'Title' => '{{ openvas[result.name] }}',
10
+ 'CVSSv2' => '{{ openvas[result.cvss_base] }}',
11
+ 'AffectedSoftware' => '{{ openvas[result.affected_software] }}',
12
+ 'Description' => '{{ openvas[result.summary] }}',
13
+ 'Recommendation' => '{{ openvas[result.solution] }}',
14
+ 'References' => "CVE: {{ openvas[result.cve] }}\nCVSS Vector: {{ cvss_base_vector }}\nBID: {{ openvas[result.bid] }}\nOther: {{ openvas[result.xref] }}",
15
+ 'RawDescription' => "(note that some of the information below can change from instance to instance of this problem)\n {{ openvas[result.description] }}"
16
+ }
17
+ }.freeze
18
+
19
+ SOURCE_FIELDS = {
20
+ evidence: [
21
+ 'evidence.port',
22
+ 'evidence.description'
23
+ ],
24
+ result: [
25
+ 'result.threat',
26
+ 'result.description',
27
+ 'result.original_threat',
28
+ 'result.notes',
29
+ 'result.overrides',
30
+ 'result.name',
31
+ 'result.cvss_base',
32
+ 'result.cvss_base_vector',
33
+ 'result.risk_factor',
34
+ 'result.cve',
35
+ 'result.bid',
36
+ 'result.xref',
37
+ 'result.summary',
38
+ 'result.insight',
39
+ 'result.info_gathered',
40
+ 'result.impact',
41
+ 'result.impact_level',
42
+ 'result.affected_software',
43
+ 'result.solution',
44
+ 'result.solution_type',
45
+ 'result.vuldetect'
46
+ ]
47
+ }.freeze
48
+ end
49
+ end
@@ -7,5 +7,6 @@ end
7
7
 
8
8
  require 'dradis/plugins/openvas/engine'
9
9
  require 'dradis/plugins/openvas/field_processor'
10
+ require 'dradis/plugins/openvas/mapping'
10
11
  require 'dradis/plugins/openvas/importer'
11
12
  require 'dradis/plugins/openvas/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-openvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.10.0
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: 2023-09-07 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
@@ -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 OpenVAS
84
84
  Scanner (v6 and v7) into Dradis.
85
- email:
85
+ email:
86
86
  executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
@@ -106,6 +106,7 @@ files:
106
106
  - lib/dradis/plugins/openvas/field_processor.rb
107
107
  - lib/dradis/plugins/openvas/gem_version.rb
108
108
  - lib/dradis/plugins/openvas/importer.rb
109
+ - lib/dradis/plugins/openvas/mapping.rb
109
110
  - lib/dradis/plugins/openvas/version.rb
110
111
  - lib/openvas/result.rb
111
112
  - lib/openvas/v6/result.rb
@@ -119,17 +120,13 @@ files:
119
120
  - spec/openvas/upload_v24_spec.rb
120
121
  - spec/spec_helper.rb
121
122
  - spec/support/fixture_loader.rb
122
- - templates/evidence.fields
123
123
  - templates/evidence.sample
124
- - templates/evidence.template
125
- - templates/result.fields
126
124
  - templates/result.sample
127
- - templates/result.template
128
125
  homepage: https://dradis.com/integrations/openvas.html
129
126
  licenses:
130
127
  - GPL-2
131
128
  metadata: {}
132
- post_install_message:
129
+ post_install_message:
133
130
  rdoc_options: []
134
131
  require_paths:
135
132
  - lib
@@ -145,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
142
  version: '0'
146
143
  requirements: []
147
144
  rubygems_version: 3.1.4
148
- signing_key:
145
+ signing_key:
149
146
  specification_version: 4
150
147
  summary: OpenVAS add-on for the Dradis Framework.
151
148
  test_files:
@@ -1,2 +0,0 @@
1
- evidence.port
2
- evidence.description
@@ -1,6 +0,0 @@
1
- #[Port]#
2
- %evidence.port%
3
-
4
-
5
- #[Description]#
6
- %evidence.description%
@@ -1,21 +0,0 @@
1
- result.threat
2
- result.description
3
- result.original_threat
4
- result.notes
5
- result.overrides
6
- result.name
7
- result.cvss_base
8
- result.cvss_base_vector
9
- result.risk_factor
10
- result.cve
11
- result.bid
12
- result.xref
13
- result.summary
14
- result.insight
15
- result.info_gathered
16
- result.impact
17
- result.impact_level
18
- result.affected_software
19
- result.solution
20
- result.solution_type
21
- result.vuldetect
@@ -1,27 +0,0 @@
1
- #[Title]#
2
- %result.name%
3
-
4
-
5
- #[CVSSv2]#
6
- %result.cvss_base%
7
-
8
- #[AffectedSoftware]#
9
- %result.affected_software%
10
-
11
- #[Description]#
12
- %result.summary%
13
-
14
- #[Recommendation]#
15
- %result.solution%
16
-
17
-
18
- #[References]#
19
- CVE: %result.cve%
20
- CVSS Vector: %cvss_base_vector%
21
- BID: %result.bid%
22
- Other: %result.xref%
23
-
24
-
25
- #[RawDescription]#
26
- (note that some of the information below can change from instance to instance of this problem)
27
- %result.description%