dradis-nipper 3.19.0 → 3.20.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 +4 -4
- data/CHANGELOG.md +1 -1
- data/lib/dradis/plugins/nipper/gem_version.rb +1 -1
- data/lib/dradis/plugins/nipper/importer.rb +6 -0
- data/spec/upload_spec.rb +12 -4
- 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: 9fb1033a715de40b44e9f58da31ec75b26973e82378d941547a75b767620fb29
|
4
|
+
data.tar.gz: 73a23e626634003fbc5acf0fc2a09c85f88e753833451c7e821d7d022c4edc24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b284f621a697f9ff1185f60fd984bef233aa098cb8b92d2d210fda4d63985ae3776f7400a5721b9bb8e39a9c677e9d6df27270af38f8f19c1eaa6aa66d1cc65c
|
7
|
+
data.tar.gz: 45a033a03043f350cabd46b3ec1fc31f5648020b8b3d61f9a5aa145c721d2fbc5836fcca7f62a3cb99f3ecc6823beb1346912d76ec54dbf201fb7bee5b5d94c8
|
data/CHANGELOG.md
CHANGED
@@ -72,6 +72,12 @@ module Dradis::Plugins::Nipper
|
|
72
72
|
label: host_xml.attr('name'),
|
73
73
|
type: :host
|
74
74
|
)
|
75
|
+
|
76
|
+
# Set device properties
|
77
|
+
@host_node.set_property(:device_name, host_xml.attr('name'))
|
78
|
+
@host_node.set_property(:device_type, host_xml.attr('type'))
|
79
|
+
@host_node.set_property(:os_version, host_xml.attr('osversion'))
|
80
|
+
@host_node.save
|
75
81
|
end
|
76
82
|
end
|
77
83
|
end
|
data/spec/upload_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe 'Nipper upload plugin' do
|
4
4
|
describe 'importer' do
|
@@ -23,14 +23,14 @@ describe 'Nipper upload plugin' do
|
|
23
23
|
OpenStruct.new(args)
|
24
24
|
end.once
|
25
25
|
|
26
|
-
@importer.import(file: 'spec/fixtures/files/invalid.xml')
|
26
|
+
@importer.import(file: File.expand_path('../spec/fixtures/files/invalid.xml', __dir__))
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'creates nodes, issues, and evidences as needed' do
|
30
30
|
expect(@content_service).to receive(:create_node) do |args|
|
31
31
|
expect(args[:label]).to eq('PA-200')
|
32
32
|
expect(args[:type]).to eq(:host)
|
33
|
-
|
33
|
+
@node = Node.create(label: args[:label])
|
34
34
|
end.once
|
35
35
|
expect(@content_service).to receive(:create_issue) do |args|
|
36
36
|
OpenStruct.new(args)
|
@@ -40,7 +40,15 @@ describe 'Nipper upload plugin' do
|
|
40
40
|
end.exactly(2).times
|
41
41
|
|
42
42
|
# Run the import
|
43
|
-
@importer.import(file: 'spec/fixtures/files/sample.xml')
|
43
|
+
@importer.import(file: File.expand_path('../spec/fixtures/files/sample.xml', __dir__))
|
44
|
+
|
45
|
+
expect(@node.properties).to eq(
|
46
|
+
{
|
47
|
+
'device_name'=>'PA-200',
|
48
|
+
'device_type'=>'Palo Alto Firewall',
|
49
|
+
'os_version'=>'7.0.0'
|
50
|
+
}
|
51
|
+
)
|
44
52
|
end
|
45
53
|
end
|
46
54
|
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.
|
4
|
+
version: 3.20.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:
|
11
|
+
date: 2021-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dradis-plugins
|
@@ -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.
|
137
|
+
rubygems_version: 3.2.4
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Nipper upload add-on for Dradis Framework.
|