dradis-nipper 3.22.0 → 4.0.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 +4 -0
- data/dradis-nipper.gemspec +1 -1
- data/lib/dradis/plugins/nipper/gem_version.rb +2 -2
- data/lib/nipper/issue.rb +8 -2
- data/spec/upload_spec.rb +3 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94d905bbc8c8f66a9ba18750cf230611a87dc0ad6b754bfb7244212a59538063
|
4
|
+
data.tar.gz: 44cc3b043be1e58aa54671c1e85ed8e207a7dc67760aa8ed520436bd834214d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eabbe29f7590cbb10324dc6bdcf7ff4b166c6da2a77e29b2358c3a9dba00ea758033dffec2c7b5d8bbfe726504272ec2a63894a219c5c2336188e022bba8bc98
|
7
|
+
data.tar.gz: d38b4f20a2a3fa9563d6215c73be02de1c9782bb7d918555fea88fcebacbbba0192fa4fbb2e9cba4dd6396b10168f2cfaad86ece558168af3878e25fd9c65dc3
|
data/CHANGELOG.md
CHANGED
data/dradis-nipper.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.files = `git ls-files`.split($\)
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
|
21
|
-
spec.add_dependency 'dradis-plugins', '~>
|
21
|
+
spec.add_dependency 'dradis-plugins', '~> 4.0.0'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
24
24
|
spec.add_development_dependency 'rake', '~> 13.0'
|
data/lib/nipper/issue.rb
CHANGED
@@ -41,7 +41,7 @@ module Nipper
|
|
41
41
|
elsif method.to_s.starts_with?('cvss')
|
42
42
|
process_cvss_field(method)
|
43
43
|
else
|
44
|
-
@xml.xpath("./#{translations_table[method]}")
|
44
|
+
collect_text(@xml.xpath("./#{translations_table[method]}"))
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -55,10 +55,16 @@ module Nipper
|
|
55
55
|
base_method = method.to_s.sub('_vector', '').to_sym
|
56
56
|
|
57
57
|
if method.to_s.ends_with?('vector')
|
58
|
-
@xml.xpath("./#{translations_table[base_method]}")
|
58
|
+
collect_text(@xml.xpath("./#{translations_table[base_method]}"))
|
59
59
|
else
|
60
60
|
@xml.xpath("./#{translations_table[base_method]}").attr('score')
|
61
61
|
end
|
62
62
|
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
def collect_text(xml_field)
|
67
|
+
xml_field.children.map { |xml_text| xml_text.text }.join("\n")
|
68
|
+
end
|
63
69
|
end
|
64
70
|
end
|
data/spec/upload_spec.rb
CHANGED
@@ -34,6 +34,7 @@ describe 'Nipper upload plugin' do
|
|
34
34
|
end.once
|
35
35
|
expect(@content_service).to receive(:create_issue) do |args|
|
36
36
|
OpenStruct.new(args)
|
37
|
+
@issue = Issue.create(text: args[:text])
|
37
38
|
end.exactly(2).times
|
38
39
|
expect(@content_service).to receive(:create_evidence) do |args|
|
39
40
|
OpenStruct.new(args)
|
@@ -49,6 +50,8 @@ describe 'Nipper upload plugin' do
|
|
49
50
|
'os_version'=>'7.0.0'
|
50
51
|
}
|
51
52
|
)
|
53
|
+
|
54
|
+
expect(@issue.fields['Finding'].lines.count).to eq(2)
|
52
55
|
end
|
53
56
|
end
|
54
57
|
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:
|
4
|
+
version: 4.0.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: 2021-
|
11
|
+
date: 2021-08-03 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.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.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.1.
|
137
|
+
rubygems_version: 3.1.4
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Nipper upload add-on for Dradis Framework.
|