dradis-nessus 5.2.0 → 5.4.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 +6 -0
- data/lib/dradis/plugins/nessus/gem_version.rb +1 -1
- metadata +2 -28
- data/.github/issue_template.md +0 -16
- data/.github/pull_request_template.md +0 -45
- data/.gitignore +0 -11
- data/.rspec +0 -2
- data/CHANGELOG.template +0 -12
- data/CONTRIBUTING.md +0 -3
- data/Gemfile +0 -23
- data/dradis-nessus.gemspec +0 -33
- data/spec/dradis/plugins/nessus/field_processor_spec.rb +0 -41
- data/spec/dradis/plugins/nessus/importer_spec.rb +0 -77
- data/spec/fixtures/files/example_v2.nessus +0 -2076
- data/spec/fixtures/files/host-01.xml +0 -18
- data/spec/fixtures/files/report_item-with-list.xml +0 -45
- data/spec/fixtures/files/vpr_score.xml +0 -37
- data/spec/fixtures/files/vulnerability_priority_rating.xml +0 -37
- data/spec/nessus/host_spec.rb +0 -29
- data/spec/spec_helper.rb +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7ac475e971a6bd47e08be398c5afebe82b6567b67bc7d585de1090afbdea70a
|
|
4
|
+
data.tar.gz: 622f90bea494deb65914b6c5a82caf5a76700065c3672ca81146568549e8d497
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8bf274f85bb04b013c3153ada303a3ea51fbd2359d316b10e2a3df3b1468c82d6ea52f81ca15befb653a7805e8e8ffe57ca85a8de0c8879e06e9f5a9d275ea2e
|
|
7
|
+
data.tar.gz: 77c4395653509fc12e7b937403d90cbbeacc21bb64f42ad3d7b3d0392c0bacf25e826e8a63705d5dd1f6f12eef84e0616b170345948c4430798206b50d45db66
|
data/CHANGELOG.md
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dradis-nessus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Martin
|
|
@@ -99,18 +99,10 @@ executables: []
|
|
|
99
99
|
extensions: []
|
|
100
100
|
extra_rdoc_files: []
|
|
101
101
|
files:
|
|
102
|
-
- ".github/issue_template.md"
|
|
103
|
-
- ".github/pull_request_template.md"
|
|
104
|
-
- ".gitignore"
|
|
105
|
-
- ".rspec"
|
|
106
102
|
- CHANGELOG.md
|
|
107
|
-
- CHANGELOG.template
|
|
108
|
-
- CONTRIBUTING.md
|
|
109
|
-
- Gemfile
|
|
110
103
|
- LICENSE
|
|
111
104
|
- README.md
|
|
112
105
|
- Rakefile
|
|
113
|
-
- dradis-nessus.gemspec
|
|
114
106
|
- lib/dradis-nessus.rb
|
|
115
107
|
- lib/dradis/plugins/nessus.rb
|
|
116
108
|
- lib/dradis/plugins/nessus/engine.rb
|
|
@@ -122,15 +114,6 @@ files:
|
|
|
122
114
|
- lib/nessus/host.rb
|
|
123
115
|
- lib/nessus/report_item.rb
|
|
124
116
|
- lib/tasks/thorfile.rb
|
|
125
|
-
- spec/dradis/plugins/nessus/field_processor_spec.rb
|
|
126
|
-
- spec/dradis/plugins/nessus/importer_spec.rb
|
|
127
|
-
- spec/fixtures/files/example_v2.nessus
|
|
128
|
-
- spec/fixtures/files/host-01.xml
|
|
129
|
-
- spec/fixtures/files/report_item-with-list.xml
|
|
130
|
-
- spec/fixtures/files/vpr_score.xml
|
|
131
|
-
- spec/fixtures/files/vulnerability_priority_rating.xml
|
|
132
|
-
- spec/nessus/host_spec.rb
|
|
133
|
-
- spec/spec_helper.rb
|
|
134
117
|
- templates/evidence.sample
|
|
135
118
|
- templates/report_host.sample
|
|
136
119
|
- templates/report_item.sample
|
|
@@ -155,13 +138,4 @@ requirements: []
|
|
|
155
138
|
rubygems_version: 3.6.9
|
|
156
139
|
specification_version: 4
|
|
157
140
|
summary: Nessus upload add-on for the Dradis Framework.
|
|
158
|
-
test_files:
|
|
159
|
-
- spec/dradis/plugins/nessus/field_processor_spec.rb
|
|
160
|
-
- spec/dradis/plugins/nessus/importer_spec.rb
|
|
161
|
-
- spec/fixtures/files/example_v2.nessus
|
|
162
|
-
- spec/fixtures/files/host-01.xml
|
|
163
|
-
- spec/fixtures/files/report_item-with-list.xml
|
|
164
|
-
- spec/fixtures/files/vpr_score.xml
|
|
165
|
-
- spec/fixtures/files/vulnerability_priority_rating.xml
|
|
166
|
-
- spec/nessus/host_spec.rb
|
|
167
|
-
- spec/spec_helper.rb
|
|
141
|
+
test_files: []
|
data/.github/issue_template.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
### Steps to reproduce
|
|
2
|
-
|
|
3
|
-
Help us help you, how can we reproduce the problem?
|
|
4
|
-
|
|
5
|
-
### Expected behavior
|
|
6
|
-
Tell us what should happen
|
|
7
|
-
|
|
8
|
-
### Actual behavior
|
|
9
|
-
Tell us what happens instead
|
|
10
|
-
|
|
11
|
-
### System configuration
|
|
12
|
-
**Dradis version**:
|
|
13
|
-
|
|
14
|
-
**Ruby version**:
|
|
15
|
-
|
|
16
|
-
**OS version**:
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
Please review [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md) and remove this line.
|
|
2
|
-
|
|
3
|
-
### Summary
|
|
4
|
-
|
|
5
|
-
Provide a general description of the code changes in your pull
|
|
6
|
-
request... were there any bugs you had fixed? If so, mention them. If
|
|
7
|
-
these bugs have open GitHub issues, be sure to tag them here as well,
|
|
8
|
-
to keep the conversation linked together.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Testing Steps
|
|
12
|
-
|
|
13
|
-
Provide steps to test functionality, described in detail for someone not familiar with this part of the application / code base
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Other Information
|
|
17
|
-
|
|
18
|
-
If there's anything else that's important and relevant to your pull
|
|
19
|
-
request, mention that information here. This could include
|
|
20
|
-
benchmarks, or other information.
|
|
21
|
-
|
|
22
|
-
Thanks for contributing to Dradis!
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Copyright assignment
|
|
26
|
-
|
|
27
|
-
Collaboration is difficult with commercial closed source but we want
|
|
28
|
-
to keep as much of the OSS ethos as possible available to users
|
|
29
|
-
who want to fix it themselves.
|
|
30
|
-
|
|
31
|
-
In order to unambiguously own and sell Dradis Framework commercial
|
|
32
|
-
products, we must have the copyright associated with the entire
|
|
33
|
-
codebase. Any code you create which is merged must be owned by us.
|
|
34
|
-
That's not us trying to be a jerks, that's just the way it works.
|
|
35
|
-
|
|
36
|
-
You can delete this section, but the following sentence needs to
|
|
37
|
-
remain in the PR's description:
|
|
38
|
-
|
|
39
|
-
> I assign all rights, including copyright, to any future Dradis
|
|
40
|
-
> work by myself to Security Roots.
|
|
41
|
-
|
|
42
|
-
### Check List
|
|
43
|
-
|
|
44
|
-
- [ ] Added a CHANGELOG entry
|
|
45
|
-
- [ ] Added specs
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/CHANGELOG.template
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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/CONTRIBUTING.md
DELETED
data/Gemfile
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
# Declare your gem's dependencies in dradispro-duoweb.gemspec.
|
|
4
|
-
# Bundler will treat runtime dependencies like base dependencies, and
|
|
5
|
-
# development dependencies will be added by default to the :development group.
|
|
6
|
-
gemspec
|
|
7
|
-
|
|
8
|
-
# jquery-rails is used by the dummy application
|
|
9
|
-
# gem "jquery-rails"
|
|
10
|
-
|
|
11
|
-
# Declare any dependencies that are still in development here instead of in
|
|
12
|
-
# your gemspec. These might include edge Rails or gems from your path or
|
|
13
|
-
# Git. Remember to move these dependencies to your gemspec before releasing
|
|
14
|
-
# your gem to rubygems.org.
|
|
15
|
-
|
|
16
|
-
# To use debugger
|
|
17
|
-
# gem 'debugger'
|
|
18
|
-
|
|
19
|
-
if Dir.exist?('../dradis-plugins')
|
|
20
|
-
gem 'dradis-plugins', path: '../dradis-plugins'
|
|
21
|
-
else
|
|
22
|
-
gem 'dradis-plugins', github: 'dradis/dradis-plugins'
|
|
23
|
-
end
|
data/dradis-nessus.gemspec
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
$:.push File.expand_path('../lib', __FILE__)
|
|
2
|
-
require 'dradis/plugins/nessus/version'
|
|
3
|
-
version = Dradis::Plugins::Nessus::VERSION::STRING
|
|
4
|
-
|
|
5
|
-
# Describe your gem and declare its dependencies:
|
|
6
|
-
Gem::Specification.new do |spec|
|
|
7
|
-
spec.platform = Gem::Platform::RUBY
|
|
8
|
-
spec.name = 'dradis-nessus'
|
|
9
|
-
spec.version = version
|
|
10
|
-
spec.summary = 'Nessus upload add-on for the Dradis Framework.'
|
|
11
|
-
spec.description = 'This add-on allows you to upload and parse output produced from Tenable\'s Nessus Scanner into Dradis.'
|
|
12
|
-
|
|
13
|
-
spec.license = 'GPL-2'
|
|
14
|
-
|
|
15
|
-
spec.authors = ['Daniel Martin']
|
|
16
|
-
spec.homepage = 'https://dradis.com/integrations/nessus.html'
|
|
17
|
-
|
|
18
|
-
spec.files = `git ls-files`.split($\)
|
|
19
|
-
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
|
20
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
21
|
-
|
|
22
|
-
# By not including Rails as a dependency, we can use the gem with different
|
|
23
|
-
# versions of Rails (a sure recipe for disaster, I'm sure), which is needed
|
|
24
|
-
# until we bump Dradis Pro to 4.1.
|
|
25
|
-
# s.add_dependency 'rails', '~> 4.1.1'
|
|
26
|
-
spec.add_dependency 'dradis-plugins', '>= 4.0'
|
|
27
|
-
spec.add_dependency 'nokogiri'
|
|
28
|
-
|
|
29
|
-
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
30
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
|
31
|
-
spec.add_development_dependency 'rspec-rails'
|
|
32
|
-
spec.add_development_dependency 'combustion', '~> 0.5.2'
|
|
33
|
-
end
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
require 'ostruct'
|
|
3
|
-
|
|
4
|
-
describe Dradis::Plugins::Nessus::FieldProcessor do
|
|
5
|
-
|
|
6
|
-
describe '%report_item.description% field formatting' do
|
|
7
|
-
context 'bullet points' do
|
|
8
|
-
before do
|
|
9
|
-
doc = Nokogiri::XML(
|
|
10
|
-
File.read('spec/fixtures/files/report_item-with-list.xml')
|
|
11
|
-
)
|
|
12
|
-
processor = described_class.new(data: doc.root)
|
|
13
|
-
|
|
14
|
-
@value = processor.value(field: 'report_item.description')
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it 'converts Nessus broken lists into Textile bullet-point lists' do
|
|
18
|
-
expect(@value).to_not be_empty
|
|
19
|
-
|
|
20
|
-
expect(@value).to include(
|
|
21
|
-
'* A denial of service vulnerability exists relating to '\
|
|
22
|
-
'the \'mod_dav\' module as it relates to MERGE requests.'
|
|
23
|
-
)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
it 'does not add unnecessary newlines to list items' do
|
|
27
|
-
expect(@value).to include("vulnerabilities:\n\n* A flaw exists")
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
it 'Recasted severity values appear in the Evidence' do
|
|
33
|
-
doc = Nokogiri::XML(
|
|
34
|
-
File.read('spec/fixtures/files/report_item-with-list.xml')
|
|
35
|
-
)
|
|
36
|
-
processor = described_class.new(data: doc.root)
|
|
37
|
-
value = processor.value(field: 'evidence.severity')
|
|
38
|
-
expect(value).to_not be_empty
|
|
39
|
-
expect(value).to include('2')
|
|
40
|
-
end
|
|
41
|
-
end
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
require 'ostruct'
|
|
3
|
-
|
|
4
|
-
describe Dradis::Plugins::Nessus::Importer do
|
|
5
|
-
before(:each) do
|
|
6
|
-
mapping_service = double('Dradis::Plugins::MappingService')
|
|
7
|
-
allow(mapping_service).to receive(:apply_mapping).and_return('')
|
|
8
|
-
allow(Dradis::Plugins::MappingService).to receive(:new).and_return(mapping_service)
|
|
9
|
-
|
|
10
|
-
# Init services
|
|
11
|
-
plugin = Dradis::Plugins::Nessus
|
|
12
|
-
|
|
13
|
-
@content_service = Dradis::Plugins::ContentService::Base.new(
|
|
14
|
-
logger: Logger.new(STDOUT),
|
|
15
|
-
plugin: plugin
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
@importer = plugin::Importer.new(
|
|
19
|
-
content_service: @content_service
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
# Stub dradis-plugins methods
|
|
23
|
-
#
|
|
24
|
-
# They return their argument hashes as objects mimicking
|
|
25
|
-
# Nodes, Issues, etc
|
|
26
|
-
allow(@content_service).to receive(:create_node) do |args|
|
|
27
|
-
obj = OpenStruct.new(args)
|
|
28
|
-
obj.define_singleton_method(:set_property) { |*| }
|
|
29
|
-
obj.define_singleton_method(:set_service) { |*| }
|
|
30
|
-
obj
|
|
31
|
-
end
|
|
32
|
-
allow(@content_service).to receive(:create_note) do |args|
|
|
33
|
-
OpenStruct.new(args)
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
it 'creates one node for each host' do
|
|
38
|
-
%w{snorby.org scanme.insecure.org}.each do |host|
|
|
39
|
-
expect(@content_service).to receive(:create_node).with(hash_including label: host).once
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
allow(@content_service).to receive(:create_evidence) do |args|
|
|
43
|
-
OpenStruct.new(args)
|
|
44
|
-
end
|
|
45
|
-
allow(@content_service).to receive(:create_issue) do |args|
|
|
46
|
-
OpenStruct.new(args)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# Run the import
|
|
50
|
-
@importer.import(file: 'spec/fixtures/files/example_v2.nessus')
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
describe 'vulnerability priority rating field' do
|
|
54
|
-
before do
|
|
55
|
-
allow(@content_service).to receive(:create_evidence) do |args|
|
|
56
|
-
OpenStruct.new(args)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
expect_any_instance_of(Dradis::Plugins::TemplateService)
|
|
60
|
-
.to receive(:template_source).and_return("#[VPR]#\n%report_item.vpr_score%\n")
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
context '<vpr_score>' do
|
|
64
|
-
it 'exports the vpr_score field' do
|
|
65
|
-
expect(@content_service).to receive(:create_issue).with(hash_including text: "#[VPR]#\n9.0\n")
|
|
66
|
-
@importer.import(file: 'spec/fixtures/files/vulnerability_priority_rating.xml')
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
context '<vulnerability_priority_rating>' do
|
|
71
|
-
it 'exports the vpr_score field' do
|
|
72
|
-
expect(@content_service).to receive(:create_issue).with(hash_including text: "#[VPR]#\n9.0\n")
|
|
73
|
-
@importer.import(file: 'spec/fixtures/files/vpr_score.xml')
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
end
|