dradis-nexpose 3.21.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +49 -53
- data/CHANGELOG.template +12 -0
- data/dradis-nexpose.gemspec +1 -1
- data/lib/dradis/plugins/nexpose/formats/full.rb +1 -1
- data/lib/dradis/plugins/nexpose/gem_version.rb +2 -2
- data/lib/nexpose/vulnerability.rb +10 -9
- data/spec/fixtures/files/full.xml +3 -0
- data/spec/nexpose_upload_spec.rb +8 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9104388051c4619bfa547e1dcf8c4a7694ddf40f280ecd835efbd207e7af45c0
|
4
|
+
data.tar.gz: a46345dbb5776757b6a213dbba8c31eabef4e73c1800095710f0cfa18f86221e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb9dfec8eadb11c646c838566424b3f240f53e8f52fff3433bc85efae8d23fc7cef12fdd336d04554369b95111c5b4e1f37bcf83f8136edf68d459505534f801
|
7
|
+
data.tar.gz: 4f905810edd2168aba965ad15f14516c93bdd3ae6f418e2eed03af41c53c998e56a5607eb86a19c740cb0dfc84ddd92c409bc92c6a4467e03fd956c327c963ff
|
data/CHANGELOG.md
CHANGED
@@ -1,73 +1,69 @@
|
|
1
|
-
|
1
|
+
v4.2.0 (February 2022)
|
2
|
+
- Pull the Hostname Node property from the `name` rather than `site-name` tag
|
2
3
|
|
3
|
-
|
4
|
+
v4.1.0 (November 2021)
|
5
|
+
- Update HTML tag cleanup to better cover `UnorderedList` and `URLLink` tags in the solution field
|
4
6
|
|
5
|
-
|
7
|
+
v4.0.0 (July 2021)
|
8
|
+
- Expand coverage for cipher wrapping to ssl-anon-ciphers and ssl-only-weak-ciphers
|
9
|
+
- Update HTML tag cleanup
|
6
10
|
|
7
|
-
|
11
|
+
v3.22.0 (April 2021)
|
12
|
+
- No changes
|
8
13
|
|
9
|
-
|
14
|
+
v3.21.0 (February 2021)
|
15
|
+
- No changes
|
10
16
|
|
11
|
-
|
17
|
+
v3.20.0 (December 2020)
|
18
|
+
- Expand coverage for cipher wrapping
|
12
19
|
|
13
|
-
|
20
|
+
v3.19.0 (September 2020)
|
21
|
+
- No changes
|
14
22
|
|
15
|
-
|
23
|
+
v3.18.0 (July 2020)
|
24
|
+
- No changes
|
16
25
|
|
17
|
-
|
26
|
+
v3.17.0 (May 2020)
|
27
|
+
- Expand coverage for cipher wrapping
|
18
28
|
|
19
|
-
|
29
|
+
v3.16.0 (February 2020)
|
30
|
+
- No changes
|
20
31
|
|
21
|
-
|
32
|
+
v3.15.0 (November 2019)
|
33
|
+
- Wrap ciphers in code blocks
|
22
34
|
|
23
|
-
|
35
|
+
v3.14.0 (August 2019)
|
36
|
+
- Add risk-score attribute to nodes
|
24
37
|
|
25
|
-
|
38
|
+
v3.13.0 (June 2019)
|
39
|
+
- No changes
|
26
40
|
|
27
|
-
|
41
|
+
v3.12.0 (March 2019)
|
42
|
+
- No changes
|
28
43
|
|
29
|
-
|
44
|
+
v3.11.0 (November 2018)
|
45
|
+
- No changes
|
30
46
|
|
31
|
-
|
47
|
+
v3.10.1 (October 2018)
|
48
|
+
- Fix usage of set_property(:services) to use set_service
|
32
49
|
|
33
|
-
|
50
|
+
v3.10.0 (August 2018)
|
51
|
+
- Create `hostname` and `os` Node properties (if present)
|
52
|
+
- Improve parsing of `<ListItem>` tags
|
53
|
+
- Import `vulnerability.tags` field as expected
|
54
|
+
- Import `<Paragraph preformat="true">` tags as code blocks
|
55
|
+
- Import `<URLLink>` tags as textile links
|
56
|
+
- Resolve duplicate content in nested `<Paragraph>` tags
|
34
57
|
|
35
|
-
|
58
|
+
v3.9.0 (January 2018)
|
59
|
+
- No changes
|
36
60
|
|
37
|
-
|
61
|
+
v3.8.0 (September 2017)
|
62
|
+
- No changes
|
38
63
|
|
39
|
-
|
64
|
+
v3.7.0 (July 2017)
|
65
|
+
- Add full evidence template for exporting evidences
|
66
|
+
- Fix issue resulting in Evidence with null content
|
40
67
|
|
41
|
-
|
42
|
-
|
43
|
-
* No changes.
|
44
|
-
|
45
|
-
## Dradis Framework 3.10.1 (October, 2018) ##
|
46
|
-
|
47
|
-
* Fix usage of set_property(:services) to use set_service
|
48
|
-
|
49
|
-
## Dradis Framework 3.10 (August, 2018) ##
|
50
|
-
|
51
|
-
* Resolve duplicate content in nested `<Paragraph>` tags
|
52
|
-
* Import `<URLLink>` tags as textile links
|
53
|
-
* Import `<Paragraph preformat="true">` tags as code blocks
|
54
|
-
* Improve parsing of `<ListItem>` tags
|
55
|
-
* Import `vulnerability.tags` field as expected
|
56
|
-
* Create `hostname` and `os` Node properties (if present)
|
57
|
-
|
58
|
-
## Dradis Framework 3.9 (January, 2018) ##
|
59
|
-
|
60
|
-
* No changes.
|
61
|
-
|
62
|
-
## Dradis Framework 3.8 (September, 2017) ##
|
63
|
-
|
64
|
-
* No changes.
|
65
|
-
|
66
|
-
## Dradis Framework 3.7 (July, 2017) ##
|
67
|
-
|
68
|
-
* Add full evidence template for exporting evidences.
|
69
|
-
* Fix issue resulting in Evidence with null content.
|
70
|
-
|
71
|
-
## Dradis Framework 3.6 (March, 2017) ##
|
72
|
-
|
73
|
-
* No changes.
|
68
|
+
v3.6.0 (March 2017)
|
69
|
+
- No changes
|
data/CHANGELOG.template
ADDED
@@ -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]
|
data/dradis-nexpose.gemspec
CHANGED
@@ -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', '~>
|
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.
|
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 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,17 +112,18 @@ 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\">(.*?)<\/Paragraph>/
|
115
|
+
result.gsub!(/<Paragraph preformat=\"true\">(.*?)<\/Paragraph>/mi){|m| "\nbc. #{ $1 }\n\n"}
|
116
116
|
result.gsub!(/<Paragraph>(.*?)<\/Paragraph>/m){|m| "#{ $1 }\n"}
|
117
|
-
result.gsub!(/<Paragraph>/, '')
|
118
|
-
result.gsub!(
|
119
|
-
result.gsub!(/<
|
120
|
-
result.gsub!(/<ListItem
|
117
|
+
result.gsub!(/<Paragraph>|<\/Paragraph>/, '')
|
118
|
+
result.gsub!(/<UnorderedList (.*?)>(.*?)<\/UnorderedList>/m){|m| "#{ $2 }"}
|
119
|
+
result.gsub!(/<OrderedList(.*?)>(.*?)<\/OrderedList>/m){|m| "#{ $2 }"}
|
120
|
+
result.gsub!(/<ListItem>|<\/ListItem>/, '')
|
121
121
|
result.gsub!(/ /, '')
|
122
|
+
result.gsub!(/ /, '')
|
122
123
|
result.gsub!(/\t\t/, '')
|
123
|
-
result.gsub!(/<URLLink
|
124
|
-
result.gsub!(/<URLLink
|
125
|
-
result.gsub!(/<URLLink
|
124
|
+
result.gsub!(/<URLLink(.*)LinkURL=\"(.*?)\"(.*?)>(.*?)<\/URLLink>/im) { "\"#{$4.strip}\":#{$2.strip} " }
|
125
|
+
result.gsub!(/<URLLink LinkTitle=\"(.*?)\"(.*?)LinkURL=\"(.*?)\"\/>/i) { "\"#{$1.strip}\":#{$3.strip} " }
|
126
|
+
result.gsub!(/<URLLink LinkURL=\"(.*?)\"(.*?)LinkTitle=\"(.*?)\"\/>/i) { "\"#{$3.strip}\":#{$1.strip} " }
|
126
127
|
result.gsub!(/>/, '>')
|
127
128
|
result.gsub!(/</, '<')
|
128
129
|
result
|
@@ -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>
|
data/spec/nexpose_upload_spec.rb
CHANGED
@@ -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
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Martin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-14 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: '
|
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: '
|
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
|
@@ -156,7 +157,7 @@ homepage: http://dradisframework.org
|
|
156
157
|
licenses:
|
157
158
|
- GPL-2
|
158
159
|
metadata: {}
|
159
|
-
post_install_message:
|
160
|
+
post_install_message:
|
160
161
|
rdoc_options: []
|
161
162
|
require_paths:
|
162
163
|
- lib
|
@@ -171,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
172
|
- !ruby/object:Gem::Version
|
172
173
|
version: '0'
|
173
174
|
requirements: []
|
174
|
-
rubygems_version: 3.
|
175
|
-
signing_key:
|
175
|
+
rubygems_version: 3.1.4
|
176
|
+
signing_key:
|
176
177
|
specification_version: 4
|
177
178
|
summary: Nexpose add-on for the Dradis Framework.
|
178
179
|
test_files:
|