dradis-coreimpact 4.11.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: 2ed260a0464eff414dd709f8020b74d3185d1743a06df2500cc8cfe679c374f6
4
- data.tar.gz: 02a92a61f3a8a57338796de0779c02dacd8085a81f8cb79fc9c8735fc1730da5
3
+ metadata.gz: 383860c5e3bf9433426b6a0e87325211d5b4aa298ca37abf1b0fc5386c3e28a3
4
+ data.tar.gz: a8854fc5cb6a7ff08b704a1b48856ec976307dc4bfc9c2fb61ad7052a5186078
5
5
  SHA512:
6
- metadata.gz: 6aae2b714e304487cf606809fa7462ff3662bd67df4257219771fbbcdd2a046186faf6987c5a6077432c209d0d60ddddfffe87fe964c7a177e41060a6b9eb834
7
- data.tar.gz: 523f0648e4da635d821d14c8be0582e969deaa67aa1514d3ad35baa8556410e6d3fb37d6958666f6caaa99297a3a95de4c9e363949d845c005481ab1a4dd4168
6
+ metadata.gz: 722fa23de92d106a7228ad8d81a737ff1e1f28e6977d7a29293d80b63d2baca12c4360ccd425be4581fcd3ea3db95fea4339d65cad05e85f1a77b6dc947a1c10
7
+ data.tar.gz: 873d0c0d8903aaa319411aa93ba0e3cbabda8f462737c45fa8c089ef89a4021ffddcb6c0aff207ef1aaf6935481ff952ba0064de534a52a5bca96d2fd20ed842
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ v4.12.0 (May 2024)
2
+ - Migrate integration to use Mappings Manager
3
+ - Update Dradis links in README
4
+
1
5
  v4.11.0 (January 2024)
2
6
  - No changes
3
7
 
data/README.md CHANGED
@@ -4,8 +4,7 @@
4
4
 
5
5
  Upload [CORE Impact](https://www.coresecurity.com/core-impact/) XML output into Dradis.
6
6
 
7
- The add-on requires [Dradis CE](https://dradisframework.com/ce/) > 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
  ## More information
11
10
 
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 11
11
+ MINOR = 12
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -94,13 +94,13 @@ module Dradis::Plugins::Coreimpact
94
94
  def add_vulnerability(xml_container, node)
95
95
  plugin_id = xml_container.at_xpath('./property[@type="container"]')['key']
96
96
 
97
- issue_text = template_service.process_template(data: xml_container, template: 'issue')
97
+ issue_text = mapping_service.apply_mapping(source: 'issue', data: xml_container)
98
98
  issue = content_service.create_issue(id: plugin_id, text: issue_text)
99
99
  logger.info{ "\tCreating new issue (plugin_id: #{plugin_id})"}
100
100
 
101
- evidence_content = template_service.process_template(
102
- data: xml_container.at_xpath('./property[@type="container"]/property[@key="Modules"]'),
103
- template: 'evidence'
101
+ evidence_content = mapping_service.apply_mapping(
102
+ source: 'evidence',
103
+ data: xml_container.at_xpath('./property[@type="container"]/property[@key="Modules"]')
104
104
  )
105
105
  content_service.create_evidence(content: evidence_content, issue: issue, node: node)
106
106
  logger.info{ "\t\tAdding reference to this host"}
@@ -0,0 +1,37 @@
1
+ module Dradis::Plugins::Coreimpact
2
+ module Mapping
3
+ DEFAULT_MAPPING = {
4
+ evidence: {
5
+ 'AgentDeployed' => '{{ coreimpact[evidence.agent_deployed] }}',
6
+ 'Description' => '{{ coreimpact[evidence.description] }}',
7
+ 'Port' => '{{ coreimpact[evidence.port] }}',
8
+ 'TriedToInstallAgent' => '{{ coreimpact[evidence.tried_to_install_agent] }}'
9
+ },
10
+ issue: {
11
+ 'Title' => '{{ coreimpact[issue.title] }}',
12
+ 'AgentDeployed' => '{{ coreimpact[issue.agent_deployed] }}',
13
+ 'CVE' => '{{ coreimpact[issue.cve] }}',
14
+ 'Description' => '{{ coreimpact[issue.description] }}',
15
+ 'Port' => '{{ coreimpact[issue.port] }}',
16
+ 'TriedToInstallAgent' => '{{ coreimpact[issue.tried_to_install_agent] }}'
17
+ }
18
+ }.freeze
19
+
20
+ SOURCE_FIELDS = {
21
+ evidence: [
22
+ 'evidence.agent_deployed',
23
+ 'evidence.description',
24
+ 'evidence.tried_to_install_agent',
25
+ 'evidence.port'
26
+ ],
27
+ issue: [
28
+ 'issue.title',
29
+ 'issue.agent_deployed',
30
+ 'issue.cve',
31
+ 'issue.description',
32
+ 'issue.port',
33
+ 'issue.tried_to_install_agent'
34
+ ]
35
+ }.freeze
36
+ end
37
+ end
@@ -7,5 +7,6 @@ end
7
7
 
8
8
  require 'dradis/plugins/coreimpact/engine'
9
9
  require 'dradis/plugins/coreimpact/field_processor'
10
+ require 'dradis/plugins/coreimpact/mapping'
10
11
  require 'dradis/plugins/coreimpact/importer'
11
12
  require 'dradis/plugins/coreimpact/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-coreimpact
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
- autorequire:
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
@@ -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 CORE
84
84
  Impact security scanner into Dradis.
85
- email:
85
+ email:
86
86
  executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
@@ -107,23 +107,20 @@ files:
107
107
  - lib/dradis/plugins/coreimpact/field_processor.rb
108
108
  - lib/dradis/plugins/coreimpact/gem_version.rb
109
109
  - lib/dradis/plugins/coreimpact/importer.rb
110
+ - lib/dradis/plugins/coreimpact/mapping.rb
110
111
  - lib/dradis/plugins/coreimpact/version.rb
111
112
  - lib/tasks/thorfile.rb
112
113
  - spec/coreimpact/importer_spec.rb
113
114
  - spec/coreimpact_upload_spec.rb
114
115
  - spec/fixtures/files/example.xml
115
116
  - spec/spec_helper.rb
116
- - templates/evidence.fields
117
117
  - templates/evidence.sample
118
- - templates/evidence.template
119
- - templates/issue.fields
120
118
  - templates/issue.sample
121
- - templates/issue.template
122
119
  homepage: https://dradis.com/integrations/coreimpact.html
123
120
  licenses:
124
121
  - GPL-2
125
122
  metadata: {}
126
- post_install_message:
123
+ post_install_message:
127
124
  rdoc_options: []
128
125
  require_paths:
129
126
  - lib
@@ -138,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
135
  - !ruby/object:Gem::Version
139
136
  version: '0'
140
137
  requirements: []
141
- rubygems_version: 3.3.7
142
- signing_key:
138
+ rubygems_version: 3.1.4
139
+ signing_key:
143
140
  specification_version: 4
144
141
  summary: CORE Impact add-on for the Dradis Framework.
145
142
  test_files:
@@ -1,4 +0,0 @@
1
- evidence.agent_deployed
2
- evidence.description
3
- evidence.tried_to_install_agent
4
- evidence.port
@@ -1,11 +0,0 @@
1
- #[AgentDeployed]#
2
- %evidence.agent_deployed%
3
-
4
- #[Description]#
5
- %evidence.description%
6
-
7
- #[Port]#
8
- %evidence.port%
9
-
10
- #[TriedToInstallAgent]#
11
- %evidence.tried_to_install_agent%
@@ -1,6 +0,0 @@
1
- issue.title
2
- issue.agent_deployed
3
- issue.cve
4
- issue.description
5
- issue.port
6
- issue.tried_to_install_agent
@@ -1,17 +0,0 @@
1
- #[Title]#
2
- %issue.title%
3
-
4
- #[AgentDeployed]#
5
- %issue.agent_deployed%
6
-
7
- #[CVE]#
8
- %issue.cve%
9
-
10
- #[Description]#
11
- %issue.description%
12
-
13
- #[Port]#
14
- %issue.port%
15
-
16
- #[TriedToInstallAgent]#
17
- %issue.tried_to_install_agent%