dradis-nessus 4.12.0 → 4.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89e36338a9a7b2d0791868394749b7ceda41c746374e18ca3262208b8901f801
4
- data.tar.gz: '085692aa88ed591b56b6e7b4f47959db2aa3a81a4157da9b42ca27dd50115098'
3
+ metadata.gz: 5b1cd71866a497daa6b69caeab52f5a5931e5797a91641919a20b0f88f966444
4
+ data.tar.gz: 6d2afaa4bf0cdeb5a07043b418e759d039e373614abfa7899a77b2f14fa9cdc8
5
5
  SHA512:
6
- metadata.gz: 6f11c491e50351cac07dc65fbfa06a96b20e73b4e1075dbccc1ef88356943a1d52847deac6a27c6e05bb50447d9f93d3d1e1ad886a0c90bdaca08a86d34b8acd
7
- data.tar.gz: 161919167d9263c1c0782ea1317947e3a3f1f1d1a3748dcf9c3690b13a98524f9d7a62dddf9f87eb4c81f35125347b4a309810fcd35cd5429e4f77fefc68616a
6
+ metadata.gz: d51ec219b303d14569ed0a43af65ed2761c465a634c4b2fc2b7957b696ad809cb44505a58d90b067054516d5ec5e6c007a2e3a5929d795da971df3cfa2c1f221
7
+ data.tar.gz: 935990184cec4b2a2870edd44ba4bc62821ce02d5181d9996332d5974ab6bd981131a16c08d9cbdd1bac9b8f070795433807238806f7c9e85d2b1b8b789d1c43
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ v4.13.0 (July 2024)
2
+ - Add `cwe_entries` as an available Issue field
3
+ - Add `vulnerability_priority_rating` as an available Issue field
4
+
1
5
  v4.12.0 (May 2024)
2
6
  - Migrate integration to use Mappings Manager
3
7
  - Update Dradis links in README
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'dradis-plugins', '~> 4.0'
27
27
  spec.add_dependency 'nokogiri'
28
28
 
29
- spec.add_development_dependency 'bundler', '~> 1.6'
29
+ spec.add_development_dependency 'bundler', '~> 2.0'
30
30
  spec.add_development_dependency 'rake', '~> 10.0'
31
31
  spec.add_development_dependency 'rspec-rails'
32
32
  spec.add_development_dependency 'combustion', '~> 0.5.2'
@@ -8,11 +8,11 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 12
11
+ MINOR = 13
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
15
- STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
15
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
16
16
  end
17
17
  end
18
18
  end
@@ -13,7 +13,7 @@ module Dradis::Plugins::Nessus
13
13
  report_item: {
14
14
  'Title' => '{{ nessus[report_item.plugin_name] }}',
15
15
  'CVSSv3.BaseScore' => '{{ nessus[report_item.cvss3_base_score] }}',
16
- 'CVSSv3Vector' => '{{ nessus[report_item.cvss3_vector] }}',
16
+ 'CVSSv3.Vector' => '{{ nessus[report_item.cvss3_vector] }}',
17
17
  'Type' => 'Internal',
18
18
  'Description' => '{{ nessus[report_item.description] }}',
19
19
  'Solution' => '{{ nessus[report_item.solution] }}',
@@ -55,6 +55,7 @@ module Dradis::Plugins::Nessus
55
55
  'report_item.age_of_vuln',
56
56
  'report_item.bid_entries',
57
57
  'report_item.cve_entries',
58
+ 'report_item.cwe_entries',
58
59
  'report_item.cvss3_base_score',
59
60
  'report_item.cvss3_impact_score',
60
61
  'report_item.cvss3_temporal_score',
@@ -31,7 +31,7 @@ module Nessus
31
31
  :risk_factor, :solution, :synopsis, :threat_intensity_last_28, :threat_recency,
32
32
  :threat_sources_last_28, :vpr_score, :vuln_publication_date,
33
33
  # multiple tags
34
- :bid_entries, :cve_entries, :see_also_entries, :xref_entries,
34
+ :bid_entries, :cve_entries, :cwe_entries, :see_also_entries, :xref_entries,
35
35
  # compliance tags
36
36
  :cm_actual_value, :cm_audit_file, :cm_check_id, :cm_check_name, :cm_info,
37
37
  :cm_output, :cm_policy_value, :cm_reference, :cm_result, :cm_see_also,
@@ -102,11 +102,18 @@ module Nessus
102
102
  end
103
103
  end
104
104
 
105
+ # older versions of Nessus use <vpr_score> while newer versions of Nessus
106
+ # use <vulnerability_priority_rating>. This allows either tag to be
107
+ # pulled in to the vpr_score mapping
108
+ if method_name == 'vpr_score'
109
+ return @xml.at_xpath('./vulnerability_priority_rating | ./vpr_score')&.text
110
+ end
105
111
 
106
112
  # finally the enumerations: bid_entries, cve_entries, xref_entries
107
113
  translations_table = {
108
114
  :bid_entries => 'bid',
109
115
  :cve_entries => 'cve',
116
+ :cwe_entries => 'cwe',
110
117
  :see_also_entries => 'see_also',
111
118
  :xref_entries => 'xref'
112
119
  }
@@ -2,13 +2,10 @@ require 'spec_helper'
2
2
  require 'ostruct'
3
3
 
4
4
  describe Dradis::Plugins::Nessus::Importer do
5
-
6
5
  before(:each) do
7
- # Stub template service
8
- templates_dir = File.expand_path('../../../../../templates', __FILE__)
9
- expect_any_instance_of(Dradis::Plugins::TemplateService)
10
- .to receive(:default_templates_dir).and_return(templates_dir)
11
-
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)
12
9
 
13
10
  # Init services
14
11
  plugin = Dradis::Plugins::Nessus
@@ -37,7 +34,7 @@ describe Dradis::Plugins::Nessus::Importer do
37
34
  end
38
35
  end
39
36
 
40
- it "creates one node for each host" do
37
+ it 'creates one node for each host' do
41
38
  %w{snorby.org scanme.insecure.org}.each do |host|
42
39
  expect(@content_service).to receive(:create_node).with(hash_including label: host).once
43
40
  end
@@ -52,4 +49,29 @@ describe Dradis::Plugins::Nessus::Importer do
52
49
  # Run the import
53
50
  @importer.import(file: 'spec/fixtures/files/example_v2.nessus')
54
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
55
77
  end
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" ?>
2
+ <NessusClientData_v2>
3
+ <Report name="vprscore" xmlns:cm="http://www.nessus.org/cm">
4
+ <ReportHost name="computer">
5
+ <HostProperties>
6
+ <tag name="host-fqdn">computer.domain</tag>
7
+ <tag name="operating-system">windows</tag>
8
+ <tag name="system-type">general-purpose</tag>
9
+ <tag name="host-uuid">real-uuid</tag>
10
+ <tag name="host-ip">0.0.0.0</tag>
11
+ <tag name="netbios-name">computer</tag>
12
+ <tag name="LastAuthenticatedResults">1111</tag>
13
+ <tag name="local-checks-proto">local</tag>
14
+ <tag name="bios-uuid">real-uuid</tag></HostProperties>
15
+ <ReportItem port="9090" svc_name="www" protocol="tcp" severity="1" pluginID="24260" pluginName="HyperText Transfer Protocol (HTTP) Information" pluginFamily="Web Servers">
16
+ <solution>n/a</solution><risk_factor>None</risk_factor><description>This test gives some information about the remote HTTP protocol - the
17
+ version used, whether HTTP Keep-Alive and HTTP pipelining are enabled,
18
+ etc...
19
+
20
+ This test is informational only and does not denote any security
21
+ problem.</description><synopsis>Some information about the remote HTTP configuration can be extracted.</synopsis><plugin_output>
22
+ Protocol version : HTTP/1.1
23
+ SSL : no
24
+ Keep-Alive : no
25
+ Options allowed : (Not implemented)
26
+ Headers :
27
+
28
+ Content-length: 1001
29
+ Server: TwistedWeb/8.1.0
30
+ Last-modified: Mon, 10 Aug 2009 07:16:33 GMT
31
+ Connection: close
32
+ Date: Fri, 11 Dec 2009 09:03:32 GMT
33
+ Content-type: text/html
34
+
35
+ </plugin_output>
36
+ <vpr_score>9.0</vpr_score>
37
+ <plugin_version>$Revision: 1.9 $</plugin_version></ReportItem></ReportHost></Report></NessusClientData_v2>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" ?>
2
+ <NessusClientData_v2>
3
+ <Report name="vulnerability_priority_rating" xmlns:cm="http://www.nessus.org/cm">
4
+ <ReportHost name="computer">
5
+ <HostProperties>
6
+ <tag name="host-fqdn">computer.domain</tag>
7
+ <tag name="operating-system">windows</tag>
8
+ <tag name="system-type">general-purpose</tag>
9
+ <tag name="host-uuid">real-uuid</tag>
10
+ <tag name="host-ip">0.0.0.0</tag>
11
+ <tag name="netbios-name">computer</tag>
12
+ <tag name="LastAuthenticatedResults">111111</tag>
13
+ <tag name="local-checks-proto">local</tag>
14
+ <tag name="bios-uuid">real-uuid</tag></HostProperties>
15
+ <ReportItem port="9090" svc_name="www" protocol="tcp" severity="1" pluginID="24260" pluginName="HyperText Transfer Protocol (HTTP) Information" pluginFamily="Web Servers">
16
+ <solution>n/a</solution><risk_factor>None</risk_factor><description>This test gives some information about the remote HTTP protocol - the
17
+ version used, whether HTTP Keep-Alive and HTTP pipelining are enabled,
18
+ etc...
19
+
20
+ This test is informational only and does not denote any security
21
+ problem.</description><synopsis>Some information about the remote HTTP configuration can be extracted.</synopsis><plugin_output>
22
+ Protocol version : HTTP/1.1
23
+ SSL : no
24
+ Keep-Alive : no
25
+ Options allowed : (Not implemented)
26
+ Headers :
27
+
28
+ Content-length: 1001
29
+ Server: TwistedWeb/8.1.0
30
+ Last-modified: Mon, 10 Aug 2009 07:16:33 GMT
31
+ Connection: close
32
+ Date: Fri, 11 Dec 2009 09:03:32 GMT
33
+ Content-type: text/html
34
+
35
+ </plugin_output>
36
+ <vulnerability_priority_rating>9.0</vulnerability_priority_rating>
37
+ <plugin_version>$Revision: 1.9 $</plugin_version></ReportItem></ReportHost></Report></NessusClientData_v2>
@@ -42,10 +42,11 @@ If safe checks are enabled, this may be a false positive since it is based on th
42
42
  <exploit_code_maturity>Unproven</exploit_code_maturity>
43
43
  <plugin_modification_date>2011/03/08</plugin_modification_date>
44
44
  <cvss_base_score>7.5</cvss_base_score>
45
- <vpr_score>6.7</vpr_score>
45
+ <vulnerability_priority_rating>6.7</vulnerability_priority_rating>
46
46
  <product_coverage>Low</product_coverage>
47
47
  <canvas_package>CANVAS</canvas_package>
48
48
  <cve>CVE-2002-0392</cve>
49
+ <cwe>123</cwe>
49
50
  <bid>5033</bid>
50
51
  <xref>IAVA:2002-a-0003</xref>
51
52
  <xref>OSVDB:838</xref>
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: 4.12.0
4
+ version: 4.13.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: 2024-05-07 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.6'
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.6'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +129,8 @@ files:
129
129
  - spec/fixtures/files/example_v2.nessus
130
130
  - spec/fixtures/files/host-01.xml
131
131
  - spec/fixtures/files/report_item-with-list.xml
132
+ - spec/fixtures/files/vpr_score.xml
133
+ - spec/fixtures/files/vulnerability_priority_rating.xml
132
134
  - spec/nessus/host_spec.rb
133
135
  - spec/spec_helper.rb
134
136
  - templates/evidence.sample
@@ -163,5 +165,7 @@ test_files:
163
165
  - spec/fixtures/files/example_v2.nessus
164
166
  - spec/fixtures/files/host-01.xml
165
167
  - spec/fixtures/files/report_item-with-list.xml
168
+ - spec/fixtures/files/vpr_score.xml
169
+ - spec/fixtures/files/vulnerability_priority_rating.xml
166
170
  - spec/nessus/host_spec.rb
167
171
  - spec/spec_helper.rb