dradis-nexpose 4.1.0 → 4.4.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 +9 -0
- data/lib/dradis/plugins/nexpose/formats/full.rb +1 -1
- data/lib/dradis/plugins/nexpose/gem_version.rb +1 -1
- data/lib/dradis/plugins/nexpose/importer.rb +5 -1
- data/lib/nexpose/vulnerability.rb +2 -1
- data/spec/fixtures/files/full.xml +3 -0
- data/spec/nexpose_upload_spec.rb +8 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9b36849f6712c97827772ce7f05c78114e83b82677bf8019fbd2e44b1e505ab
|
4
|
+
data.tar.gz: 91f3fa3599201045962abd082d85069da3aa698f45f4696d3f4729c64d3e5d39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16491a215ac75a2ae56ed537c3b203c243610b41cea1e5caa5b2550ec6ba3603cbd9bce14dcecc6286882f4035cbbe6b5336e019a5a82a56b9a2847902a71f43
|
7
|
+
data.tar.gz: 051356d800eb248d2186dad362aba87b5bea5e7287c856975b81f63d5b96e25ab120899e146a2d9dcc6fa7f8bdb96fcfb78c60eff6862b0d5249bd166d0e8610
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
v4.4.0 (June 2022)
|
2
|
+
- Registers template mappings locally
|
3
|
+
|
4
|
+
v4.3.0 (April 2022)
|
5
|
+
- Update HTML tag cleanup to cover `UnorderedList` tags without spaces and double `Paragraph preformat` tags
|
6
|
+
|
7
|
+
v4.2.0 (February 2022)
|
8
|
+
- Pull the Hostname Node property from the `name` rather than `site-name` tag
|
9
|
+
|
1
10
|
v4.1.0 (November 2021)
|
2
11
|
- Update HTML tag cleanup to better cover `UnorderedList` and `URLLink` tags in the solution field
|
3
12
|
|
@@ -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
|
@@ -7,6 +7,10 @@ module Dradis::Plugins::Nexpose
|
|
7
7
|
include Formats::Full
|
8
8
|
include Formats::Simple
|
9
9
|
|
10
|
+
def self.templates
|
11
|
+
{ evidence: 'full_evidence', issue: 'full_vulnerability' }
|
12
|
+
end
|
13
|
+
|
10
14
|
# The framework will call this function if the user selects this plugin from
|
11
15
|
# the dropdown list and uploads a file.
|
12
16
|
# @returns true if the operation was successful, false otherwise
|
@@ -31,4 +35,4 @@ module Dradis::Plugins::Nexpose
|
|
31
35
|
end
|
32
36
|
end
|
33
37
|
end
|
34
|
-
end
|
38
|
+
end
|
@@ -112,10 +112,11 @@ 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
|
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!(/ /, '')
|
@@ -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.
|
4
|
+
version: 4.4.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:
|
11
|
+
date: 2022-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dradis-plugins
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
|
-
rubygems_version: 3.
|
175
|
+
rubygems_version: 3.2.32
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: Nexpose add-on for the Dradis Framework.
|