dradis-coreimpact 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: f2684cc69ebcdf43db4aac8fb9a2082c1ee52375bf209c277e5e5821dd3bf3a4
4
- data.tar.gz: abb7c74ed576b2af6b59289a68aff0e6fd5db3b70d8345f4f8b01da80c3443d8
3
+ metadata.gz: 383860c5e3bf9433426b6a0e87325211d5b4aa298ca37abf1b0fc5386c3e28a3
4
+ data.tar.gz: a8854fc5cb6a7ff08b704a1b48856ec976307dc4bfc9c2fb61ad7052a5186078
5
5
  SHA512:
6
- metadata.gz: dcfd452f365c6087731ba88d4e51313c8ea08124d9cc8ca453aa05f36d3ff0c3542557ae44314fb85160e860f0e6bba1d11008fbc31f6e9396a9f3f64b87b607
7
- data.tar.gz: 513f90456c0f15ada2598b2c02fe76fe8de5b0a543b3646601b38a9bb293b9ef888e97c6a4fb07f8a1ca4bb9384e44e20d2d48cdcd52327ce8f1d8a80f50d25e
6
+ metadata.gz: 722fa23de92d106a7228ad8d81a737ff1e1f28e6977d7a29293d80b63d2baca12c4360ccd425be4581fcd3ea3db95fea4339d65cad05e85f1a77b6dc947a1c10
7
+ data.tar.gz: 873d0c0d8903aaa319411aa93ba0e3cbabda8f462737c45fa8c089ef89a4021ffddcb6c0aff207ef1aaf6935481ff952ba0064de534a52a5bca96d2fd20ed842
@@ -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,17 +4,16 @@
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
 
12
- See the Dradis Framework's [README.md](https://github.com/dradis/dradisframework/blob/master/README.md)
11
+ See the Dradis Framework's [README.md](https://github.com/dradis/dradis-ce/blob/develop/README.md)
13
12
 
14
13
 
15
14
  ## Contributing
16
15
 
17
- See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradisframework/blob/master/CONTRIBUTING.md)
16
+ See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md)
18
17
 
19
18
 
20
19
  ## 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
 
@@ -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.10.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: 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
@@ -107,18 +107,15 @@ 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
@@ -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%