dradis-nessus 3.6.0 → 3.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9cc963449349533ff36a39bf7a5338de17af5bdf
4
- data.tar.gz: 72fdc4c22873c9ce4b2d8718d23f34fdf9ba459f
3
+ metadata.gz: a14b2a69eab17116cc157efa4f8d1b295f5635c6
4
+ data.tar.gz: e5bfed8770eed64b75b5800ba518762c9ae1820e
5
5
  SHA512:
6
- metadata.gz: eea8e61c79488f36a540089d3222cd40044a2bf290fac5f1b58fe651c4dcbef2c341b5d98b61e92d85a3997c1d7eb2faadcd52d8d6d0bfdd940c2927f927600b
7
- data.tar.gz: 3e76531c1ef2f4df25b1487af2b5ab7d181ecdb870dc7cd8da6e7ac02930a581e4b73e245242726dc353cee5b034632ddd3eff5c08b60824e21d4940a04e5cb8
6
+ metadata.gz: 423de525cac3910168f9423db7da9a28ef9bdd7a20192f179728bc1a58e0c265b79aa5feffaae799761af470a19f2cf191bd96022999fab97f05f631f4461fd6
7
+ data.tar.gz: c5e29c4c84d65f5995db98ce4f4f6c7105b7466ac5ecd2493867b9ca6309108276271ab56a72bb894d0eb5881fdcec882aefbd667bc161fce259b4b57da499ff
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
- ## Dradis Framework 3.6 (March XX, 2017) ##
1
+ ## Dradis Framework 3.7 (July, 2017) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Dradis Framework 3.6 (March, 2017) ##
2
7
 
3
8
  * No changes.
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 3
11
- MINOR = 6
11
+ MINOR = 7
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -7,19 +7,15 @@ class NessusTasks < Thor
7
7
  def upload(file_path)
8
8
  require 'config/environment'
9
9
 
10
- logger = Logger.new(STDOUT)
11
- logger.level = Logger::DEBUG
12
-
13
10
  unless File.exists?(file_path)
14
11
  $stderr.puts "** the file [#{file_path}] does not exist"
15
12
  exit(-1)
16
13
  end
17
14
 
18
15
  detect_and_set_project_scope
19
- importer = Dradis::Plugins::Nessus::Importer.new(logger: logger)
20
- importer.import(file: file_path)
21
16
 
22
- logger.close
17
+ importer = Dradis::Plugins::Nessus::Importer.new(task_options)
18
+ importer.import(file: file_path)
23
19
  end
24
20
 
25
21
  end
@@ -13,12 +13,13 @@ describe Dradis::Plugins::Nessus::Importer do
13
13
  # Init services
14
14
  plugin = Dradis::Plugins::Nessus
15
15
 
16
- @content_service = Dradis::Plugins::ContentService.new(plugin: plugin)
17
- template_service = Dradis::Plugins::TemplateService.new(plugin: plugin)
16
+ @content_service = Dradis::Plugins::ContentService::Base.new(
17
+ logger: Logger.new(STDOUT),
18
+ plugin: plugin
19
+ )
18
20
 
19
21
  @importer = plugin::Importer.new(
20
- content_service: @content_service,
21
- template_service: template_service
22
+ content_service: @content_service
22
23
  )
23
24
 
24
25
  # Stub dradis-plugins methods
@@ -26,7 +27,9 @@ describe Dradis::Plugins::Nessus::Importer do
26
27
  # They return their argument hashes as objects mimicking
27
28
  # Nodes, Issues, etc
28
29
  allow(@content_service).to receive(:create_node) do |args|
29
- OpenStruct.new(args)
30
+ obj = OpenStruct.new(args)
31
+ obj.define_singleton_method(:set_property) { |_, __| }
32
+ obj
30
33
  end
31
34
  allow(@content_service).to receive(:create_note) do |args|
32
35
  OpenStruct.new(args)
@@ -48,4 +51,4 @@ describe Dradis::Plugins::Nessus::Importer do
48
51
  # Run the import
49
52
  @importer.import(file: 'spec/fixtures/files/example_v2.nessus')
50
53
  end
51
- end
54
+ end
@@ -6,15 +6,13 @@
6
6
  <tag name="HOST_END">Tue Aug 9 09:59:24 2011</tag>
7
7
  <tag name="HOST_START">Tue Aug 9 09:50:18 2011</tag>
8
8
  </HostProperties>
9
- <ReportItem
10
- port="0"
11
- svc_name="general"
12
- protocol="udp"
13
- severity="1"
14
- pluginID="10287"
15
- pluginName="Traceroute Information"
16
- pluginFamily="General">
17
- </ReportIem>
9
+ <ReportItem port="0" svc_name="general" protocol="udp" severity="1" pluginID="10287" pluginName="Traceroute Information" pluginFamily="General" />
10
+ <ReportItem port="0" svc_name="unknown" protocol="icmp" severity="0" pluginID="0" pluginName="" pluginFamily=""/>
11
+ <ReportItem port="0" svc_name="unknown" protocol="tcp" severity="0" pluginID="0" pluginName="" pluginFamily=""/>
12
+ <ReportItem port="0" svc_name="unknown" protocol="udp" severity="0" pluginID="0" pluginName="" pluginFamily=""/>
13
+ <ReportItem port="21" svc_name="ftp?" protocol="tcp" severity="0" pluginID="0" pluginName="" pluginFamily=""/>
14
+ <ReportItem port="22" svc_name="ssh" protocol="tcp" severity="0" pluginID="0" pluginName="" pluginFamily=""/>
15
+ <ReportItem port="9090" svc_name="www" protocol="tcp" severity="0" pluginID="0" pluginName="" pluginFamily=""/>
18
16
  </ReportHost>
19
17
  </Report>
20
18
  </NessusClientData_v2>
@@ -3,6 +3,11 @@ require 'spec_helper'
3
3
  describe Nessus::Host do
4
4
  let(:host1_xml) { File.expand_path('../../fixtures/files/host-01.xml', __FILE__) }
5
5
 
6
+ before do
7
+ doc = Nokogiri::XML(File.read(host1_xml))
8
+ @host = Nessus::Host.new(doc.xpath('/NessusClientData_v2/Report/ReportHost').first)
9
+ end
10
+
6
11
  # These are the properties we need to support:
7
12
  # host.name The name given at scan time, usually an IP address
8
13
  # host.ip The ip address of the host
@@ -13,11 +18,12 @@ describe Nessus::Host do
13
18
  # host.scan_start_time The date/time the scan started
14
19
  # host.scan_stop_time The date/time the scan ended
15
20
  it 'Nessus::Host responds to all the expected fields' do
16
- doc = Nokogiri::XML(File.read(host1_xml))
17
- host = Nessus::Host.new( doc.xpath('/NessusClientData_v2/Report/ReportHost').first )
18
- expect(host.name).to eq('10.0.0.1')
19
- expect(host.scan_start_time).to eq('Tue Aug 9 09:50:18 2011')
21
+ expect(@host.name).to eq('10.0.0.1')
22
+ expect(@host.scan_start_time).to eq('Tue Aug 9 09:50:18 2011')
20
23
  end
21
24
 
22
- pending 'Nessus::Host should provide access to each of its ReportItems'
23
- end
25
+ it 'provides access to each of its ReportItems' do
26
+ report_items = @host.report_items
27
+ report_items.each { |item| expect(item).to be_a(Nessus::ReportItem) }
28
+ end
29
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-nessus
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.7.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: 2017-04-06 00:00:00.000000000 Z
11
+ date: 2017-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  version: '0'
158
158
  requirements: []
159
159
  rubyforge_project:
160
- rubygems_version: 2.4.5
160
+ rubygems_version: 2.6.8
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: Nessus upload add-on for the Dradis Framework.