dradis-nexpose 4.0.0 → 4.3.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: 3221e4566a6908aac405d51d9f5d165cd67229c0f8ea0f2361775d1b238eab6a
4
- data.tar.gz: c518c809aafcf83da0dc452b471a4831ce21396b7205b482f53e2bf1495d23d1
3
+ metadata.gz: 0c51805184f0768194c6847137daf88038647c86332c2d9939b936fff4255ba1
4
+ data.tar.gz: 7ecd5e769dcc1c27eb268b0d1326df19e9dd6fe4c8209c8e15bde379839a5368
5
5
  SHA512:
6
- metadata.gz: bfb28ff16fb0fee4d491828fff1e3e8caf8c09e2cc6ad1ddb29ed2c7c4abe0c86f5d3064c037f8773dda53d857bf61f350fe4947f49a3be55b0d726e173ae9a0
7
- data.tar.gz: 9096410b85f110249f860cd5a875cc8788a5d194519f5e78413198721e7399cd4ba5667d3ce92df61915706d848cd214850e26e3a31a070b7b490ca24b0b9425
6
+ metadata.gz: dea870174817b843f104047b2382b3049bb485d0ecfee949f75960ce410ab04326d49f9e5f22b52e433d001ac886ec04bd03a9c26396b8457c4662ba28fc389f
7
+ data.tar.gz: 240cba4c9a281adcf6bb2733119ecd6f373b19c385fff18c6fe4d69754b646f4b172f7111225de797cd23e8bc3da653f3be81162d93b6b82de00fda2f3aa69f9
data/CHANGELOG.md CHANGED
@@ -1,81 +1,72 @@
1
- ## Dradis Framework 4.0.0 (July, 2021) ##
1
+ v4.3.0 (April 2022)
2
+ - Update HTML tag cleanup to cover `UnorderedList` tags without spaces and double `Paragraph preformat` tags
2
3
 
3
- * Update HTML tag cleanup
4
+ v4.2.0 (February 2022)
5
+ - Pull the Hostname Node property from the `name` rather than `site-name` tag
4
6
 
5
- ## Dradis Framework 3.22 (April, 2021) ##
7
+ v4.1.0 (November 2021)
8
+ - Update HTML tag cleanup to better cover `UnorderedList` and `URLLink` tags in the solution field
6
9
 
7
- * No changes.
10
+ v4.0.0 (July 2021)
11
+ - Expand coverage for cipher wrapping to ssl-anon-ciphers and ssl-only-weak-ciphers
12
+ - Update HTML tag cleanup
8
13
 
9
- ## Dradis Framework 3.21 (February, 2021) ##
14
+ v3.22.0 (April 2021)
15
+ - No changes
10
16
 
11
- * No changes.
17
+ v3.21.0 (February 2021)
18
+ - No changes
12
19
 
13
- ## Dradis Framework 3.20 (December, 2020) ##
20
+ v3.20.0 (December 2020)
21
+ - Expand coverage for cipher wrapping
14
22
 
15
- * Expand coverage for cipher wrapping
23
+ v3.19.0 (September 2020)
24
+ - No changes
16
25
 
17
- ## Dradis Framework 3.19 (September, 2020) ##
26
+ v3.18.0 (July 2020)
27
+ - No changes
18
28
 
19
- * No changes.
29
+ v3.17.0 (May 2020)
30
+ - Expand coverage for cipher wrapping
20
31
 
21
- ## Dradis Framework 3.18 (July, 2020) ##
32
+ v3.16.0 (February 2020)
33
+ - No changes
22
34
 
23
- * No changes.
35
+ v3.15.0 (November 2019)
36
+ - Wrap ciphers in code blocks
24
37
 
25
- ## Dradis Framework 3.17 (May, 2020) ##
38
+ v3.14.0 (August 2019)
39
+ - Add risk-score attribute to nodes
26
40
 
27
- * Expand coverage for cipher wrapping
41
+ v3.13.0 (June 2019)
42
+ - No changes
28
43
 
29
- ## Dradis Framework 3.16 (February, 2020) ##
44
+ v3.12.0 (March 2019)
45
+ - No changes
30
46
 
31
- * No changes.
47
+ v3.11.0 (November 2018)
48
+ - No changes
32
49
 
33
- ## Dradis Framework 3.15 (November, 2019) ##
50
+ v3.10.1 (October 2018)
51
+ - Fix usage of set_property(:services) to use set_service
34
52
 
35
- * Wrap ciphers in code blocks
53
+ v3.10.0 (August 2018)
54
+ - Create `hostname` and `os` Node properties (if present)
55
+ - Improve parsing of `<ListItem>` tags
56
+ - Import `vulnerability.tags` field as expected
57
+ - Import `<Paragraph preformat="true">` tags as code blocks
58
+ - Import `<URLLink>` tags as textile links
59
+ - Resolve duplicate content in nested `<Paragraph>` tags
36
60
 
37
- ## Dradis Framework 3.14 (August, 2019) ##
61
+ v3.9.0 (January 2018)
62
+ - No changes
38
63
 
39
- * Add risk-score attribute to nodes
64
+ v3.8.0 (September 2017)
65
+ - No changes
40
66
 
41
- ## Dradis Framework 3.13 (June, 2019) ##
67
+ v3.7.0 (July 2017)
68
+ - Add full evidence template for exporting evidences
69
+ - Fix issue resulting in Evidence with null content
42
70
 
43
- * No changes.
44
-
45
- ## Dradis Framework 3.12 (March, 2019) ##
46
-
47
- * No changes.
48
-
49
- ## Dradis Framework 3.11 (November, 2018) ##
50
-
51
- * No changes.
52
-
53
- ## Dradis Framework 3.10.1 (October, 2018) ##
54
-
55
- * Fix usage of set_property(:services) to use set_service
56
-
57
- ## Dradis Framework 3.10 (August, 2018) ##
58
-
59
- * Resolve duplicate content in nested `<Paragraph>` tags
60
- * Import `<URLLink>` tags as textile links
61
- * Import `<Paragraph preformat="true">` tags as code blocks
62
- * Improve parsing of `<ListItem>` tags
63
- * Import `vulnerability.tags` field as expected
64
- * Create `hostname` and `os` Node properties (if present)
65
-
66
- ## Dradis Framework 3.9 (January, 2018) ##
67
-
68
- * No changes.
69
-
70
- ## Dradis Framework 3.8 (September, 2017) ##
71
-
72
- * No changes.
73
-
74
- ## Dradis Framework 3.7 (July, 2017) ##
75
-
76
- * Add full evidence template for exporting evidences.
77
- * Fix issue resulting in Evidence with null content.
78
-
79
- ## Dradis Framework 3.6 (March, 2017) ##
80
-
81
- * No changes.
71
+ v3.6.0 (March 2017)
72
+ - No changes
@@ -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]
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  # versions of Rails (a sure recipe for disaster, I'm sure), which is needed
26
26
  # until we bump Dradis Pro to 4.1.
27
27
  # s.add_dependency 'rails', '~> 4.1.1'
28
- spec.add_dependency 'dradis-plugins', '~> 4.0.0'
28
+ spec.add_dependency 'dradis-plugins', '~> 4.0'
29
29
  spec.add_dependency 'nokogiri', '~> 1.3'
30
30
 
31
31
  spec.add_development_dependency 'bundler'
@@ -34,7 +34,7 @@ module Dradis::Plugins::Nexpose::Formats
34
34
  if host_node.respond_to?(:properties)
35
35
  logger.info{ "\tAdding host properties to #{nexpose_node.address}"}
36
36
  host_node.set_property(:ip, nexpose_node.address)
37
- host_node.set_property(:hostname, nexpose_node.site_name)
37
+ host_node.set_property(:hostname, nexpose_node.names)
38
38
  host_node.set_property(:os, nexpose_node.software)
39
39
  host_node.set_property(:risk_score, nexpose_node.risk_score)
40
40
  host_node.save
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 0
11
+ MINOR = 3
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -8,7 +8,7 @@ module Nexpose
8
8
  # Instead of providing separate methods for each supported property we rely
9
9
  # on Ruby's #method_missing to do most of the work.
10
10
  class Vulnerability
11
- SSL_CIPHER_VULN_IDS = %w[ssl-des-ciphers ssl-3des-ciphers ssl-export-ciphers ssl-null-ciphers ssl-static-key-ciphers rc4-cve-2013-2566 ssl-cve-2016-2183-sweet32 tls-dhe-export-ciphers-cve-2015-4000].freeze
11
+ SSL_CIPHER_VULN_IDS = %w[ssl-anon-ciphers ssl-des-ciphers ssl-3des-ciphers ssl-export-ciphers ssl-null-ciphers ssl-only-weak-ciphers ssl-static-key-ciphers rc4-cve-2013-2566 ssl-cve-2016-2183-sweet32 tls-dhe-export-ciphers-cve-2015-4000].freeze
12
12
 
13
13
  # Accepts an XML node from Nokogiri::XML.
14
14
  def initialize(xml_node)
@@ -112,16 +112,17 @@ module Nexpose
112
112
  def cleanup_html(source)
113
113
  result = source.to_s
114
114
  result.gsub!(/<ContainerBlockElement>(.*?)<\/ContainerBlockElement>/m){|m| "#{ $1 }"}
115
+ result.gsub!(/<Paragraph preformat=\"true\">(\s*)<Paragraph preformat=\"true\">(.*?)<\/Paragraph>(\s*)<\/Paragraph>/mi){|m| "\nbc. #{ $2 }\n\n"}
115
116
  result.gsub!(/<Paragraph preformat=\"true\">(.*?)<\/Paragraph>/mi){|m| "\nbc. #{ $1 }\n\n"}
116
117
  result.gsub!(/<Paragraph>(.*?)<\/Paragraph>/m){|m| "#{ $1 }\n"}
117
118
  result.gsub!(/<Paragraph>|<\/Paragraph>/, '')
118
- result.gsub!(/<UnorderedList>(.*?)<\/UnorderedList>/m){|m| "#{ $1 }"}
119
+ result.gsub!(/<UnorderedList(.*?)>(.*?)<\/UnorderedList>/m){|m| "#{ $2 }"}
119
120
  result.gsub!(/<OrderedList(.*?)>(.*?)<\/OrderedList>/m){|m| "#{ $2 }"}
120
121
  result.gsub!(/<ListItem>|<\/ListItem>/, '')
121
122
  result.gsub!(/ /, '')
122
123
  result.gsub!(/ /, '')
123
124
  result.gsub!(/\t\t/, '')
124
- result.gsub!(/<URLLink(.*)LinkURL=\"(.*?)\"(.*?)>(.*?)<\/URLLink>/i) { "\"#{$4.strip}\":#{$2.strip} " }
125
+ result.gsub!(/<URLLink(.*)LinkURL=\"(.*?)\"(.*?)>(.*?)<\/URLLink>/im) { "\"#{$4.strip}\":#{$2.strip} " }
125
126
  result.gsub!(/<URLLink LinkTitle=\"(.*?)\"(.*?)LinkURL=\"(.*?)\"\/>/i) { "\"#{$1.strip}\":#{$3.strip} " }
126
127
  result.gsub!(/<URLLink LinkURL=\"(.*?)\"(.*?)LinkTitle=\"(.*?)\"\/>/i) { "\"#{$3.strip}\":#{$1.strip} " }
127
128
  result.gsub!(/&gt;/, '>')
@@ -5,6 +5,9 @@
5
5
  </scans>
6
6
  <nodes>
7
7
  <node address="1.1.1.1" device-id="75" risk-score="0.0" scan-template="Edge Standard" site-importance="Normal" site-name="USDA_Internal" status="alive">
8
+ <names>
9
+ <name>localhost:5000</name>
10
+ </names>
8
11
  <fingerprints>
9
12
  <os certainty="0.80" family="IOS" product="IOS" vendor="Cisco"/>
10
13
  </fingerprints>
@@ -79,7 +79,6 @@ describe 'Nexpose upload plugin' do
79
79
 
80
80
  describe "Importer: Full" do
81
81
  it "creates nodes, issues, notes and an evidences as needed" do
82
-
83
82
  expect(@content_service).to receive(:create_node).with(hash_including label: "Nexpose Scan Summary").once
84
83
  expect(@content_service).to receive(:create_note) do |args|
85
84
  expect(args[:text]).to include("#[Title]#\nUSDA_Internal (4)")
@@ -123,6 +122,14 @@ describe 'Nexpose upload plugin' do
123
122
  expect(args[:node].label).to eq("1.1.1.1")
124
123
  end.once
125
124
 
125
+ allow_any_instance_of(OpenStruct).to receive(:respond_to?).with(:properties).and_return(true)
126
+ allow_any_instance_of(OpenStruct).to receive(:set_service).and_return(true)
127
+
128
+ expect_any_instance_of(OpenStruct).to receive(:set_property).with(:hostname, ['localhost:5000'])
129
+ expect_any_instance_of(OpenStruct).to receive(:set_property).with(:ip, '1.1.1.1')
130
+ expect_any_instance_of(OpenStruct).to receive(:set_property).with(:os, [])
131
+ expect_any_instance_of(OpenStruct).to receive(:set_property).with(:risk_score, '0.0')
132
+
126
133
  @importer.import(file: 'spec/fixtures/files/full.xml')
127
134
  end
128
135
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-nexpose
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.3.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: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2022-04-29 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: 4.0.0
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: 4.0.0
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -107,6 +107,7 @@ files:
107
107
  - ".gitignore"
108
108
  - ".rspec"
109
109
  - CHANGELOG.md
110
+ - CHANGELOG.template
110
111
  - CONTRIBUTING.md
111
112
  - Gemfile
112
113
  - LICENSE