nexpose_servicenow 0.4.23 → 0.4.24
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3df03f3e1e1368fc16c60c61da775e397035309f
|
|
4
|
+
data.tar.gz: 5997f1479b0084bb174329a43ac92373240ec704
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad9e10d478b454d5b474c20f6cfdddb8018f979f71562f0948a569f76ef6e1ee0c9dfa3ad871013d6b4f3cf5d72bc3c9aa33bb016b0226f219976137a06cf16c
|
|
7
|
+
data.tar.gz: 7c07adc6765b58543b9172b3bb0b00ab01f9fa6e6fc21698a6b07c02681cca728fba16843e200c4d7ef1ae2ad7130778d38ddd7f98a631d5228aabc55f7c9962
|
|
@@ -48,9 +48,11 @@ module NexposeServiceNow
|
|
|
48
48
|
clean_up_reports(report_name)
|
|
49
49
|
|
|
50
50
|
delta_options = create_query_options(query_options, id)
|
|
51
|
+
delta_options['site_id'] = id
|
|
51
52
|
|
|
52
53
|
query = Queries.send(query_name, delta_options)
|
|
53
54
|
report_id = generate_config(query, report_name, [id], id_type)
|
|
55
|
+
|
|
54
56
|
run_report(report_id)
|
|
55
57
|
reports << save_report(report_name, report_id, output_dir)
|
|
56
58
|
end
|
|
@@ -81,17 +83,22 @@ module NexposeServiceNow
|
|
|
81
83
|
end
|
|
82
84
|
|
|
83
85
|
def generate_config(query, report_name, ids, id_type)
|
|
86
|
+
@nsc = connect(@username, @password)
|
|
84
87
|
@log.log_message "Generating query config with name #{report_name}..."
|
|
85
88
|
report_config = Nexpose::ReportConfig.new(report_name, nil, 'sql')
|
|
86
89
|
report_config.add_filter('version', '2.0.1')
|
|
87
90
|
report_config.add_filter('query', query)
|
|
88
91
|
|
|
92
|
+
@log.log_message "Saving report config #{report_name}..."
|
|
89
93
|
ids.each { |id| report_config.add_filter(id_type, id) if id != -1 }
|
|
90
94
|
report_id = report_config.save(@nsc, false)
|
|
95
|
+
@log.log_message "Report #{report_name} saved"
|
|
96
|
+
|
|
97
|
+
report_id
|
|
91
98
|
end
|
|
92
99
|
|
|
93
100
|
def run_report(report_id)
|
|
94
|
-
|
|
101
|
+
@log.log_message "Running report #{report_id}..."
|
|
95
102
|
@nsc.generate_report(report_id, false)
|
|
96
103
|
wait_for_report(report_id)
|
|
97
104
|
end
|
|
@@ -116,6 +116,7 @@ module NexposeServiceNow
|
|
|
116
116
|
fact_asset.pci_status
|
|
117
117
|
|
|
118
118
|
FROM dim_asset
|
|
119
|
+
JOIN (select * from dim_site_asset WHERE site_id=#{options['site_id']}) dsa USING (asset_id)
|
|
119
120
|
JOIN fact_asset USING (asset_id)
|
|
120
121
|
LEFT OUTER JOIN dim_operating_system on dim_asset.operating_system_id = dim_operating_system.operating_system_id
|
|
121
122
|
LEFT OUTER JOIN dim_host_type USING (host_type_id)"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nexpose_servicenow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.24
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Valente
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-12-
|
|
11
|
+
date: 2016-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
97
|
version: '0'
|
|
98
98
|
requirements: []
|
|
99
99
|
rubyforge_project:
|
|
100
|
-
rubygems_version: 2.
|
|
100
|
+
rubygems_version: 2.6.7
|
|
101
101
|
signing_key:
|
|
102
102
|
specification_version: 4
|
|
103
103
|
summary: Gem for Nexpose-ServiceNow integration.
|