NexposeRunner 0.0.15 → 0.0.16b
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/NexposeRunner.gemspec +1 -1
- data/bin/scan +3 -2
- data/config/scan.yml.example +2 -0
- data/lib/NexposeRunner/version.rb +1 -1
- data/lib/nexpose-runner/constants.rb +3 -1
- data/lib/nexpose-runner/scan_run_description.rb +20 -0
- data/spec/scan_spec.rb +7 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8e89ef4d3e80c11b69a9ac7c428b5364038fa69
|
4
|
+
data.tar.gz: 14fa8331a41d2e546427779f0980db6805d78f0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0a68bafb364870344cd0d3ccc0bd38a06fcf701321ec300c35b8ac9146d9c59e9b45de51cffec1b3a3f193511fb29332d3668d133ea94f26f6cf5c37fb030b
|
7
|
+
data.tar.gz: 43bf8f648747b2c00a33103c427fcfe08be560668833cdc72e40d6d3268b6bdd962ab0012df7ef6d8d19c2b3097ee6c36475896589f58a00505a6ed1be84948f
|
data/NexposeRunner.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'nexpose', '
|
21
|
+
spec.add_dependency 'nexpose', '7.1.1'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
24
24
|
spec.add_development_dependency 'rake', '< 11.0'
|
data/bin/scan
CHANGED
@@ -13,8 +13,9 @@ if ARGV.grep(/^--/).empty?
|
|
13
13
|
'site_name' => ARGV[4],
|
14
14
|
'ip_addresses' => ARGV[5],
|
15
15
|
'scan_template' => ARGV[6],
|
16
|
-
'engine' => ARGV[7]
|
17
|
-
|
16
|
+
'engine' => ARGV[7],
|
17
|
+
'timeout' => ARGV[8],
|
18
|
+
'open_timeout' => ARGV[9]})
|
18
19
|
else
|
19
20
|
NexposeRunner::Scan.start(ARGV)
|
20
21
|
end
|
data/config/scan.yml.example
CHANGED
@@ -8,8 +8,10 @@ module CONSTANTS
|
|
8
8
|
REQUIRED_SCAN_TEMPLATE_MESSAGE = 'OOPS! Looks like you forgot to give me a Scan Template to use'
|
9
9
|
VULNERABILITY_FOUND_MESSAGE = '---------All YOUR BASE ARE BELONG TO US---------------\nVulnerabilities were found, breaking build'
|
10
10
|
DEFAULT_PORT = '3780'
|
11
|
+
DEFAULT_TIMEOUT = '120'
|
12
|
+
DEFAULT_OPEN_TIMEOUT = '120'
|
11
13
|
VULNERABILITY_REPORT_NAME = 'nexpose-vulnerability-report.csv'
|
12
|
-
VULNERABILITY_DETAIL_REPORT_NAME = 'nexpose-vulnerability-detail-report.csv'
|
14
|
+
VULNERABILITY_DETAIL_REPORT_NAME = 'nexpose-vulnerability-detail-report.csv'
|
13
15
|
SOFTWARE_REPORT_NAME = 'nexpose-software-report.csv'
|
14
16
|
POLICY_REPORT_NAME = 'nexpose-policy-report.csv'
|
15
17
|
|
@@ -5,6 +5,8 @@ class ScanRunDescription
|
|
5
5
|
attr_accessor :connection_url, :exceptions_list_url, :username, :password, :port, :site_name, :ip_addresses, :scan_template, :engine
|
6
6
|
@@port_value = ''
|
7
7
|
@@ip_addresses = []
|
8
|
+
@@timeout = ''
|
9
|
+
@@open_timeout =''
|
8
10
|
exceptions_list_url_value = ''
|
9
11
|
|
10
12
|
def initialize(options)
|
@@ -23,6 +25,8 @@ class ScanRunDescription
|
|
23
25
|
self.ip_addresses = options['ip_addresses']
|
24
26
|
self.scan_template = options['scan_template']
|
25
27
|
self.engine = options['engine']
|
28
|
+
self.timeout = options['timeout']
|
29
|
+
self.open_timeout = options['open_timeout']
|
26
30
|
end
|
27
31
|
|
28
32
|
def verify
|
@@ -43,6 +47,22 @@ class ScanRunDescription
|
|
43
47
|
get_value(@@port_value, CONSTANTS::DEFAULT_PORT)
|
44
48
|
end
|
45
49
|
|
50
|
+
def timeout=(value)
|
51
|
+
@@timeout = value
|
52
|
+
end
|
53
|
+
|
54
|
+
def timeout
|
55
|
+
get_value(@@timeout, CONSTANTS::DEFAULT_TIMEOUT)
|
56
|
+
end
|
57
|
+
|
58
|
+
def open_timeout=(value)
|
59
|
+
@@open_timeout = value
|
60
|
+
end
|
61
|
+
|
62
|
+
def open_timeout
|
63
|
+
get_value(@@open_timeout, CONSTANTS::DEFAULT_OPEN_TIMEOUT)
|
64
|
+
end
|
65
|
+
|
46
66
|
def exceptions_list_url=(value)
|
47
67
|
@@exceptions_list_url_value = value
|
48
68
|
end
|
data/spec/scan_spec.rb
CHANGED
@@ -21,7 +21,9 @@ describe 'nexpose-runner' do
|
|
21
21
|
@expected_site_name = 'my_cool_software_build-28'
|
22
22
|
@expected_ips = '10.5.0.15,10.5.0.20,10.5.0.35'
|
23
23
|
@expected_scan_template = 'full-audit-widget-corp'
|
24
|
-
|
24
|
+
@timeout = '120'
|
25
|
+
@open_timeout = '120'
|
26
|
+
|
25
27
|
@mock_scan_id = '12'
|
26
28
|
@mock_site_id = '1'
|
27
29
|
|
@@ -63,6 +65,8 @@ describe 'nexpose-runner' do
|
|
63
65
|
'site_name' => @expected_site_name,
|
64
66
|
'ip_addresses' => @expected_ips,
|
65
67
|
'scan_template' => @expected_scan_template,
|
68
|
+
'timeout' => @timeout,
|
69
|
+
'open_timeout' => @open_timeout
|
66
70
|
}
|
67
71
|
|
68
72
|
end
|
@@ -72,7 +76,8 @@ describe 'nexpose-runner' do
|
|
72
76
|
.with(@options['connection_url'],
|
73
77
|
@options['username'],
|
74
78
|
@options['password'],
|
75
|
-
@options['port']
|
79
|
+
@options['port']
|
80
|
+
)
|
76
81
|
.and_return(@mock_nexpose_client)
|
77
82
|
|
78
83
|
expect(@mock_nexpose_client).to receive(:login)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: NexposeRunner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16b
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Gibson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nexpose
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 7.1.1
|
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: 7.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,9 +109,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- - "
|
112
|
+
- - ">"
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
114
|
+
version: 1.3.1
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
117
|
rubygems_version: 2.5.2
|