dradis-nessus 3.14.0 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd7afd05a70168f26f4ceef72062d12190696b9ed57161f4ad530a749483c927
4
- data.tar.gz: 2e05105e0c649763c636b9d7e97198f76911f414774a909c5068f39b3b45d8f1
3
+ metadata.gz: 1ffe6eb14f5e857063d0c8af0be18459fa0dd340eedae0dfe08bd129eb4a2994
4
+ data.tar.gz: 6e4687f774e30e59a33c9e2f287a7c6cbebc7791e940250fa80c44cc80bbf963
5
5
  SHA512:
6
- metadata.gz: f39dbb129bc08c24cafb412d0cd8e6d595f042806699b7fb8466e70758b7db4cc563b1b0cf900e12b76b78ffe3e55920a06234265f6de9ab861b8b7e5e52f280
7
- data.tar.gz: 5fed2a78b870244b93baf874eca6d673dbde08b9082bb9cf35274c6b45d956ac081015de65f0dd66e24024a0be0658ea86b84d9ed1df2151fdc6f469c097ce51
6
+ metadata.gz: db9e161e630d31c5fada8b4f5be00895207be2305cfb64b775c2045901d7b1697b3b3e1089ffa23858368b98370ef266d628b700b5399141e768b843b87a7838
7
+ data.tar.gz: 3321b5ba7b17ffa71a9292461d2e1b568038afbea954dc4292c469954e33ec8dba40131435c8b7c61b5272ddfdea4ff5e7fcce88a67f808f883eb405c16e1ea0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Dradis Framework 3.15 (November, 2019) ##
2
+
3
+ * Fixed bullet points formatting to handle internal text column widths
4
+
1
5
  ## Dradis Framework 3.14 (August, 2019) ##
2
6
 
3
7
  * No changes.
@@ -28,7 +28,7 @@ module Dradis
28
28
  else
29
29
  output = @nessus_object.try(name) || 'n/a'
30
30
 
31
- if field == 'report_item.description' && output =~ /^ -/
31
+ if field == 'report_item.description' && output =~ /^\s+-/
32
32
  format_bullet_point_lists(output)
33
33
  else
34
34
  output
@@ -39,15 +39,17 @@ module Dradis
39
39
  private
40
40
  def format_bullet_point_lists(input)
41
41
  input.split("\n").map do |paragraph|
42
- if paragraph =~ /^ - (.*)$/m
43
- '* ' + $1.gsub(/ /, '').gsub(/\n/, ' ')
42
+ if paragraph =~ /(.*)\s+:\s*$/m
43
+ $1 + ':'
44
+ elsif paragraph =~ /^\s+-\s+(.*)$/m
45
+ '* ' + $1.gsub(/\s{3,}/, ' ').gsub(/\n/, ' ')
44
46
  else
45
47
  paragraph
46
48
  end
47
- end.join("\n\n")
49
+ end.join("\n")
48
50
  end
49
51
  end
50
52
 
51
53
  end
52
54
  end
53
- end
55
+ end
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 3
11
- MINOR = 14
11
+ MINOR = 15
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -3,25 +3,39 @@ require 'ostruct'
3
3
 
4
4
  describe Dradis::Plugins::Nessus::FieldProcessor do
5
5
 
6
- describe "%report_item.description% field formatting" do
7
- context "bullet points" do
8
- it "converts Nessus broken lists into Textile bullet-point lists" do
9
- doc = Nokogiri::XML(File.read('spec/fixtures/files/report_item-with-list.xml'))
6
+ describe '%report_item.description% field formatting' do
7
+ context 'bullet points' do
8
+ before do
9
+ doc = Nokogiri::XML(
10
+ File.read('spec/fixtures/files/report_item-with-list.xml')
11
+ )
10
12
  processor = described_class.new(data: doc.root)
11
13
 
12
- value = processor.value(field: 'report_item.description')
13
- expect(value).to_not be_empty
14
+ @value = processor.value(field: 'report_item.description')
15
+ end
16
+
17
+ it 'converts Nessus broken lists into Textile bullet-point lists' do
18
+ expect(@value).to_not be_empty
19
+
20
+ expect(@value).to include(
21
+ '* A denial of service vulnerability exists relating to '\
22
+ 'the \'mod_dav\' module as it relates to MERGE requests.'
23
+ )
24
+ end
14
25
 
15
- expect(value).to include("* A denial of service vulnerability exists relating to the 'mod_dav' module as it relates to MERGE requests. (CVE-2013-1896)")
26
+ it 'does not add unnecessary newlines to list items' do
27
+ expect(@value).to include("vulnerabilities:\n\n* A flaw exists")
16
28
  end
17
29
  end
18
30
  end
19
31
 
20
- it "Recasted severity values appear in the Evidence" do
21
- doc = Nokogiri::XML(File.read('spec/fixtures/files/report_item-with-list.xml'))
32
+ it 'Recasted severity values appear in the Evidence' do
33
+ doc = Nokogiri::XML(
34
+ File.read('spec/fixtures/files/report_item-with-list.xml')
35
+ )
22
36
  processor = described_class.new(data: doc.root)
23
37
  value = processor.value(field: 'evidence.severity')
24
38
  expect(value).to_not be_empty
25
- expect(value).to include("2")
39
+ expect(value).to include('2')
26
40
  end
27
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-nessus
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.14.0
4
+ version: 3.15.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: 2019-08-13 00:00:00.000000000 Z
11
+ date: 2019-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubygems_version: 3.0.3
161
+ rubygems_version: 3.0.1
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: Nessus upload add-on for the Dradis Framework.