dradis-nipper 3.22.0 → 4.0.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: 7108006d37d19a047920ece9586159fc81c0dbe7aa89e9a01836dd50f5ca950e
4
- data.tar.gz: a4159affaa8992b999e3ba9728e3ede2500eeff51f7391ff43ed2b3ec3e28f5c
3
+ metadata.gz: 94d905bbc8c8f66a9ba18750cf230611a87dc0ad6b754bfb7244212a59538063
4
+ data.tar.gz: 44cc3b043be1e58aa54671c1e85ed8e207a7dc67760aa8ed520436bd834214d0
5
5
  SHA512:
6
- metadata.gz: c5d134e2907551d3922083bc7581fda59dae76e142854a23d0d5db87e0232e0aa512ff03e5a65186468996c9bbd06a566d50820e92379ddce0ebea18bacdc459
7
- data.tar.gz: 5d9fda2222fc9b352e9b1c4e07bc6a5fe2e9092ca03811f27617397f35ad27c118f8d056892a6a0d680c4ba3e57a4bcb145d051b9b87273a9749779922bff7f6
6
+ metadata.gz: eabbe29f7590cbb10324dc6bdcf7ff4b166c6da2a77e29b2358c3a9dba00ea758033dffec2c7b5d8bbfe726504272ec2a63894a219c5c2336188e022bba8bc98
7
+ data.tar.gz: d38b4f20a2a3fa9563d6215c73be02de1c9782bb7d918555fea88fcebacbbba0192fa4fbb2e9cba4dd6396b10168f2cfaad86ece558168af3878e25fd9c65dc3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Dradis Framework 4.0.0 (July, 2021) ##
2
+
3
+ * Include multiple paragraphs when importing fields.
4
+
1
5
  ## Dradis Framework 3.22 (April, 2021) ##
2
6
 
3
7
  * No changes.
@@ -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.0'
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 2.1'
24
24
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -6,8 +6,8 @@ module Dradis
6
6
  end
7
7
 
8
8
  module VERSION
9
- MAJOR = 3
10
- MINOR = 22
9
+ MAJOR = 4
10
+ MINOR = 0
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.22.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dradis Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-02 00:00:00.000000000 Z
11
+ date: 2021-08-03 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.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.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  requirements: []
137
- rubygems_version: 3.1.2
137
+ rubygems_version: 3.1.4
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: Nipper upload add-on for Dradis Framework.