dradis-nipper 3.20.0 → 4.1.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: 9fb1033a715de40b44e9f58da31ec75b26973e82378d941547a75b767620fb29
4
- data.tar.gz: 73a23e626634003fbc5acf0fc2a09c85f88e753833451c7e821d7d022c4edc24
3
+ metadata.gz: fe1aee104430cbceb735c5fc028d86410bb1eb2d7d42af4115c4288cedd94a55
4
+ data.tar.gz: 8e40d9506778255333b47a863d56d5c09c9808df6ee50588067fb75f7cf5ea85
5
5
  SHA512:
6
- metadata.gz: b284f621a697f9ff1185f60fd984bef233aa098cb8b92d2d210fda4d63985ae3776f7400a5721b9bb8e39a9c677e9d6df27270af38f8f19c1eaa6aa66d1cc65c
7
- data.tar.gz: 45a033a03043f350cabd46b3ec1fc31f5648020b8b3d61f9a5aa145c721d2fbc5836fcca7f62a3cb99f3ecc6823beb1346912d76ec54dbf201fb7bee5b5d94c8
6
+ metadata.gz: bd8429fba3ae24a4bf41b69895b1d329f946ea68d2731722942eaf66dd5c88ad04f60b01427c7ee7859602a80a4b9c93950ef16abf0f79210edf641c2420098c
7
+ data.tar.gz: 06a77726e511b800383992b5b33c005208f1b5867a2ac599ea8631e56dc3c281fb3ca2c8b4a4553df5d77b9aac44844818d39678bb2e097a73b4f7a7312b213a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
- ## Dradis Framework 3.20 (XXX, 2020) ##
1
+ v4.1.0 (November 2021)
2
+ - No changes
2
3
 
3
- * Initial version.
4
+ v4.0.0 (July 2021)
5
+ - Include multiple paragraphs when importing fields
6
+
7
+ v3.22.0 (April 2021)
8
+ - No changes
9
+
10
+ v3.21.0 (February 2021)
11
+ - No changes
12
+
13
+ v3.20.0 (December 2020)
14
+ - Initial version
@@ -0,0 +1,12 @@
1
+ [v#.#.#] ([month] [YYYY])
2
+ - [future tense verb] [feature]
3
+ - Upgraded gems:
4
+ - [gem]
5
+ - Bugs fixes:
6
+ - [future tense verb] [bug fix]
7
+ - Bug tracker items:
8
+ - [item]
9
+ - Security Fixes:
10
+ - High: (Authenticated|Unauthenticated) (admin|author|contributor) [vulnerability description]
11
+ - Medium: (Authenticated|Unauthenticated) (admin|author|contributor) [vulnerability description]
12
+ - Low: (Authenticated|Unauthenticated) (admin|author|contributor) [vulnerability description]
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.files = `git ls-files`.split($\)
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
 
21
- spec.add_dependency 'dradis-plugins', '~> 3.8'
21
+ spec.add_dependency 'dradis-plugins', '~> 4.0'
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 2.1'
24
24
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -1,13 +1,9 @@
1
- module Dradis
2
- module Plugins
3
- module Nipper
4
- class Engine < ::Rails::Engine
5
- isolate_namespace Dradis::Plugins::Nipper
1
+ module Dradis::Plugins::Nipper
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace Dradis::Plugins::Nipper
6
4
 
7
- include ::Dradis::Plugins::Base
8
- description 'Processes Nipper XML format'
9
- provides :upload
10
- end
11
- end
5
+ include ::Dradis::Plugins::Base
6
+ description 'Processes Nipper XML format'
7
+ provides :upload
12
8
  end
13
9
  end
@@ -6,8 +6,8 @@ module Dradis
6
6
  end
7
7
 
8
8
  module VERSION
9
- MAJOR = 3
10
- MINOR = 20
9
+ MAJOR = 4
10
+ MINOR = 1
11
11
  TINY = 0
12
12
  PRE = nil
13
13
 
data/lib/nipper/issue.rb CHANGED
@@ -41,7 +41,7 @@ module Nipper
41
41
  elsif method.to_s.starts_with?('cvss')
42
42
  process_cvss_field(method)
43
43
  else
44
- @xml.xpath("./#{translations_table[method]}").first.try(:text)
44
+ collect_text(@xml.xpath("./#{translations_table[method]}"))
45
45
  end
46
46
  end
47
47
 
@@ -55,10 +55,16 @@ module Nipper
55
55
  base_method = method.to_s.sub('_vector', '').to_sym
56
56
 
57
57
  if method.to_s.ends_with?('vector')
58
- @xml.xpath("./#{translations_table[base_method]}").first.try(:text)
58
+ collect_text(@xml.xpath("./#{translations_table[base_method]}"))
59
59
  else
60
60
  @xml.xpath("./#{translations_table[base_method]}").attr('score')
61
61
  end
62
62
  end
63
+
64
+ private
65
+
66
+ def collect_text(xml_field)
67
+ xml_field.children.map { |xml_text| xml_text.text }.join("\n")
68
+ end
63
69
  end
64
70
  end
data/spec/upload_spec.rb CHANGED
@@ -34,6 +34,7 @@ describe 'Nipper upload plugin' do
34
34
  end.once
35
35
  expect(@content_service).to receive(:create_issue) do |args|
36
36
  OpenStruct.new(args)
37
+ @issue = Issue.create(text: args[:text])
37
38
  end.exactly(2).times
38
39
  expect(@content_service).to receive(:create_evidence) do |args|
39
40
  OpenStruct.new(args)
@@ -49,6 +50,8 @@ describe 'Nipper upload plugin' do
49
50
  'os_version'=>'7.0.0'
50
51
  }
51
52
  )
53
+
54
+ expect(@issue.fields['Finding'].lines.count).to eq(2)
52
55
  end
53
56
  end
54
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-nipper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.20.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dradis Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.8'
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.8'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - CHANGELOG.md
92
+ - CHANGELOG.template
92
93
  - CONTRIBUTING.md
93
94
  - Gemfile
94
95
  - LICENSE
@@ -115,11 +116,11 @@ files:
115
116
  - templates/issue.fields
116
117
  - templates/issue.sample
117
118
  - templates/issue.template
118
- homepage:
119
+ homepage:
119
120
  licenses:
120
121
  - Commercial - Dradis Pro
121
122
  metadata: {}
122
- post_install_message:
123
+ post_install_message:
123
124
  rdoc_options: []
124
125
  require_paths:
125
126
  - lib
@@ -134,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
135
  - !ruby/object:Gem::Version
135
136
  version: '0'
136
137
  requirements: []
137
- rubygems_version: 3.2.4
138
- signing_key:
138
+ rubygems_version: 3.1.6
139
+ signing_key:
139
140
  specification_version: 4
140
141
  summary: Nipper upload add-on for Dradis Framework.
141
142
  test_files: