emasser 3.4.1 → 3.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +8 -8
- data/.env-example +12 -12
- data/.github/release-drafter.yml +15 -15
- data/.github/workflows/codeql-analysis.yml +70 -70
- data/.github/workflows/draft-release.yml +15 -15
- data/.github/workflows/gh-pages.yml +32 -32
- data/.github/workflows/push-to-docker-mail.yml +28 -28
- data/.github/workflows/push-to-docker.yml +35 -35
- data/.github/workflows/release.yml +42 -42
- data/.github/workflows/rubocop.yml +23 -23
- data/.github/workflows/test-cli.yml +39 -72
- data/.gitignore +19 -19
- data/.mergify.yml +25 -25
- data/.rubocop.yml +83 -80
- data/.rubocop_todo.yml +27 -27
- data/CHANGELOG.md +16 -16
- data/Dockerfile +44 -44
- data/Gemfile +8 -8
- data/Gemfile.lock +108 -104
- data/LICENSE.md +15 -15
- data/README.md +178 -178
- data/Rakefile +18 -18
- data/_config.yml +1 -1
- data/docs/features.md +1501 -1436
- data/docs/redoc/index.html +1230 -1230
- data/emasser.gemspec +44 -44
- data/exe/emasser +5 -5
- data/lib/emasser/cli.rb +37 -37
- data/lib/emasser/configuration.rb +49 -49
- data/lib/emasser/constants.rb +26 -26
- data/lib/emasser/delete.rb +148 -148
- data/lib/emasser/errors.rb +14 -14
- data/lib/emasser/get.rb +1194 -949
- data/lib/emasser/help/approvalCac_post_mapper.md +20 -20
- data/lib/emasser/help/approvalPac_post_mapper.md +20 -20
- data/lib/emasser/help/artifacts_del_mapper.md +9 -9
- data/lib/emasser/help/artifacts_post_mapper.md +59 -59
- data/lib/emasser/help/artifacts_put_mapper.md +34 -34
- data/lib/emasser/help/cloudresource_post_mapper.md +62 -62
- data/lib/emasser/help/cmmc_get_mapper.md +4 -4
- data/lib/emasser/help/container_post_mapper.md +44 -44
- data/lib/emasser/help/controls_put_mapper.md +74 -74
- data/lib/emasser/help/milestone_del_mapper.md +11 -11
- data/lib/emasser/help/milestone_post_mapper.md +14 -14
- data/lib/emasser/help/milestone_put_mapper.md +23 -23
- data/lib/emasser/help/poam_del_mapper.md +5 -5
- data/lib/emasser/help/poam_post_mapper.md +93 -93
- data/lib/emasser/help/poam_put_mapper.md +107 -107
- data/lib/emasser/help/staticcode_clear_mapper.md +16 -16
- data/lib/emasser/help/staticcode_post_mapper.md +21 -21
- data/lib/emasser/help/testresults_post_mapper.md +21 -21
- data/lib/emasser/help.rb +11 -11
- data/lib/emasser/input_converters.rb +21 -21
- data/lib/emasser/options_parser.rb +20 -20
- data/lib/emasser/output_converters.rb +115 -111
- data/lib/emasser/post.rb +830 -830
- data/lib/emasser/put.rb +588 -588
- data/lib/emasser/version.rb +5 -5
- data/lib/emasser.rb +19 -19
- metadata +16 -10
data/lib/emasser/get.rb
CHANGED
@@ -1,949 +1,1194 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# rubocop:disable Naming/MethodName
|
4
|
-
|
5
|
-
# Hack class that properly formats the CLI help
|
6
|
-
class SubCommandBase < Thor
|
7
|
-
include OptionsParser
|
8
|
-
include InputConverters
|
9
|
-
include OutputConverters
|
10
|
-
|
11
|
-
# We do not control the method declaration for the banner
|
12
|
-
|
13
|
-
# rubocop:disable Style/OptionalBooleanParameter
|
14
|
-
def self.banner(command, _namespace = nil, subcommand = false)
|
15
|
-
# Use the $thor_runner (declared by the Thor CLI framework)
|
16
|
-
# to properly format the help text of sub-sub-commands.
|
17
|
-
|
18
|
-
# rubocop:disable Style/GlobalVars
|
19
|
-
if ancestors[0].to_s.include? '::Get'
|
20
|
-
"#{basename} #{command.formatted_usage(self, $thor_runner, subcommand)}"
|
21
|
-
else
|
22
|
-
"#{basename} get #{command.formatted_usage(self, $thor_runner, subcommand)}"
|
23
|
-
end
|
24
|
-
# rubocop:enable Style/GlobalVars
|
25
|
-
end
|
26
|
-
# rubocop:enable Style/OptionalBooleanParameter
|
27
|
-
end
|
28
|
-
|
29
|
-
module Emasser
|
30
|
-
# The Test Connection endpoint is provided by eMASS to verify and troubleshoot the
|
31
|
-
# connection to the web service.
|
32
|
-
#
|
33
|
-
# Endpoint:
|
34
|
-
# /api - Test connection to the API
|
35
|
-
class Test < SubCommandBase
|
36
|
-
def self.exit_on_failure?
|
37
|
-
true
|
38
|
-
end
|
39
|
-
|
40
|
-
desc 'connection', 'Test connection to the API'
|
41
|
-
|
42
|
-
def connection
|
43
|
-
result = EmassClient::TestApi.new.test_connection
|
44
|
-
puts to_output_hash(result).green
|
45
|
-
rescue EmassClient::ApiError => e
|
46
|
-
puts 'Exception when calling TestApi->test_connection'.red
|
47
|
-
puts to_output_hash(e).yellow
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
# The Systems endpoints provide the ability to view system information.
|
52
|
-
#
|
53
|
-
# Endpoint:
|
54
|
-
# /api/systems - Get system information
|
55
|
-
# /api/systems/{systemId} - Get system information for a specific system
|
56
|
-
class System < SubCommandBase
|
57
|
-
def self.exit_on_failure?
|
58
|
-
true
|
59
|
-
end
|
60
|
-
|
61
|
-
desc 'id [--system_name [SYSTEM_NAME]] [--system_owner [SYSTEM_OWNER]]',
|
62
|
-
'Attempts to provide system ID of a system with name [NAME] and owner [SYSTEM_OWNER]'
|
63
|
-
|
64
|
-
# Required parameters/fields
|
65
|
-
option :system_name
|
66
|
-
option :system_owner
|
67
|
-
|
68
|
-
def id
|
69
|
-
if options[:system_name].nil? && options[:system_owner].nil?
|
70
|
-
raise ArgumentError,
|
71
|
-
'SYSTEM_NAME or SYSTEM_OWNER is required'
|
72
|
-
end
|
73
|
-
|
74
|
-
begin
|
75
|
-
results = EmassClient::SystemsApi.new.get_systems
|
76
|
-
results = filter_systems(results, options[:system_name], options[:system_owner])
|
77
|
-
results.each { |result| puts "#{result[:systemId]} - #{result[:systemOwner]} - #{result[:name]}" }
|
78
|
-
rescue EmassClient::ApiError => e
|
79
|
-
puts 'Exception when calling SystemsApi->get_systems'
|
80
|
-
puts to_output_hash(e).yellow
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
85
|
-
no_commands do
|
86
|
-
def filter_systems(results, system_name = nil, system_owner = nil)
|
87
|
-
results = results.to_body if results.respond_to?(:to_body)
|
88
|
-
if system_owner.nil?
|
89
|
-
results[:data].filter { |result| result[:name].eql?(system_name) }
|
90
|
-
elsif system_name.nil?
|
91
|
-
results[:data].filter { |result| result[:systemOwner].eql?(system_owner) }
|
92
|
-
else
|
93
|
-
results[:data].filter { |result| result[:name].eql?(system_name) && result[:systemOwner].eql?(system_owner) }
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
98
|
-
|
99
|
-
desc
|
100
|
-
option :systemId, type: :numeric, required: true,
|
101
|
-
desc: 'A numeric value representing the system identification'
|
102
|
-
option :includePackage, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
103
|
-
option :policy, type: :string, required: false, enum: %w[diacap rmf reporting]
|
104
|
-
|
105
|
-
def byId
|
106
|
-
optional_options_keys = optional_options(@_initializer).keys
|
107
|
-
optional_options = to_input_hash(optional_options_keys, options)
|
108
|
-
# optional_options.merge!(Emasser::GET_SYSTEM_RETURN_TYPE)
|
109
|
-
|
110
|
-
begin
|
111
|
-
# Get system information matching provided parameters
|
112
|
-
result = EmassClient::SystemsApi.new.get_system(options[:systemId], optional_options)
|
113
|
-
puts to_output_hash(result).green
|
114
|
-
rescue EmassClient::ApiError => e
|
115
|
-
puts 'Exception when calling SystemsApi->get_system'.red
|
116
|
-
puts to_output_hash(e).yellow
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
class Systems < SubCommandBase
|
122
|
-
def self.exit_on_failure?
|
123
|
-
true
|
124
|
-
end
|
125
|
-
|
126
|
-
desc
|
127
|
-
# Optional parameters/fields
|
128
|
-
option :registrationType,
|
129
|
-
type: :string, required: false,
|
130
|
-
enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider]
|
131
|
-
option :ditprId, type: :string, required: false,
|
132
|
-
desc: 'DoD Information Technology (IT) Portfolio Repository (DITPR) string Id'
|
133
|
-
option :coamsId, type: :string, required: false,
|
134
|
-
desc: 'Cyber Operational Attributes Management System (COAMS) string Id'
|
135
|
-
option :policy, type: :string, required: false, enum: %w[diacap rmf reporting]
|
136
|
-
|
137
|
-
option :includePackage, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
138
|
-
option :includeDitprMetrics, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
139
|
-
option :includeDecommissioned, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
140
|
-
option :reportsForScorecard, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
141
|
-
|
142
|
-
def all
|
143
|
-
optional_options_keys = optional_options(@_initializer).keys
|
144
|
-
optional_options = to_input_hash(optional_options_keys, options)
|
145
|
-
# optional_options.merge!(Emasser::GET_SYSTEM_RETURN_TYPE)
|
146
|
-
|
147
|
-
begin
|
148
|
-
# Get system information matching provided parameters
|
149
|
-
result = EmassClient::SystemsApi.new.get_systems(optional_options)
|
150
|
-
puts to_output_hash(result).green
|
151
|
-
rescue EmassClient::ApiError => e
|
152
|
-
puts 'Exception when calling SystemsApi->get_systems'.red
|
153
|
-
puts to_output_hash(e).yellow
|
154
|
-
end
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
# The System Roles endpoints provides the ability to access user data assigned to systems.
|
159
|
-
# Notes:
|
160
|
-
# The endpoint can access three different role categories: PAC, CAC, and Other.
|
161
|
-
# If a system is dual-policy enabled, the returned system role information will default
|
162
|
-
# to the RMF policy information unless otherwise specified.
|
163
|
-
#
|
164
|
-
# Endpoint:
|
165
|
-
# /api/system-roles - Get all available roles
|
166
|
-
# /api/system-roles/{roleCategory} - Get system roles for provided role catgory
|
167
|
-
class Roles < SubCommandBase
|
168
|
-
def self.exit_on_failure?
|
169
|
-
true
|
170
|
-
end
|
171
|
-
|
172
|
-
desc 'all', 'Retrieves all available system roles'
|
173
|
-
|
174
|
-
def all
|
175
|
-
result = EmassClient::SystemRolesApi.new.get_system_roles
|
176
|
-
puts to_output_hash(result).green
|
177
|
-
rescue EmassClient::ApiError => e
|
178
|
-
puts 'Exception when calling SystemRolesApi->get_system_roles'.red
|
179
|
-
puts to_output_hash(e).yellow
|
180
|
-
end
|
181
|
-
|
182
|
-
desc
|
183
|
-
# Required parameters/fields
|
184
|
-
option :roleCategory, type: :string, required: true, enum: %w[PAC CAC Other]
|
185
|
-
option :role, type: :string, required: true,
|
186
|
-
enum: ['AO', 'Auditor', 'Artifact Manager', 'C&A Team', 'IAO',
|
187
|
-
'ISSO', 'PM/IAM', 'SCA', 'User Rep', 'Validator']
|
188
|
-
# Optional parameters/fields
|
189
|
-
option :policy, type: :string, required: false, default: 'rmf', enum: %w[diacap rmf reporting]
|
190
|
-
option :includeDecommissioned, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
191
|
-
|
192
|
-
def byCategory
|
193
|
-
optional_options_keys = optional_options(@_initializer).keys
|
194
|
-
optional_options = to_input_hash(optional_options_keys, options)
|
195
|
-
|
196
|
-
begin
|
197
|
-
result = EmassClient::SystemRolesApi.new.get_system_roles_by_category_id(options[:roleCategory],
|
198
|
-
options[:role], optional_options)
|
199
|
-
puts to_output_hash(result).green
|
200
|
-
rescue EmassClient::ApiError => e
|
201
|
-
puts 'Exception when calling SystemRolesApi->get_system_by_role_category_id'.red
|
202
|
-
puts to_output_hash(e).yellow
|
203
|
-
end
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
|
-
# The Controls endpoints provide the ability to view Security Control information
|
208
|
-
# of a system for both the Implementation Plan and Risk Assessment.
|
209
|
-
#
|
210
|
-
# Endpoint:
|
211
|
-
# /api/systems/{systemId}/controls - Get control information in a system for one or many controls
|
212
|
-
class Controls < SubCommandBase
|
213
|
-
def self.exit_on_failure?
|
214
|
-
true
|
215
|
-
end
|
216
|
-
|
217
|
-
desc 'forSystem', 'Get control information in a system for one or many controls (acronym)'
|
218
|
-
# Required parameters/fields
|
219
|
-
option :systemId, type: :numeric, required: true,
|
220
|
-
desc: 'A numeric value representing the system identification'
|
221
|
-
# Optional parameters/fields
|
222
|
-
option :acronyms, type: :string, required: false,
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
puts
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
option :
|
256
|
-
option :
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
puts
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
#
|
274
|
-
#
|
275
|
-
#
|
276
|
-
#
|
277
|
-
# /api/systems/{systemId}/poams
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
option :
|
295
|
-
option :
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
puts
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
puts
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
#
|
329
|
-
#
|
330
|
-
#
|
331
|
-
# /api/systems/{systemId}/poams/{poamId}/milestones - Get
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
puts
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
)
|
379
|
-
|
380
|
-
|
381
|
-
puts
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
390
|
-
#
|
391
|
-
# /api/systems/{systemId}/artifacts
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
option :
|
404
|
-
option :
|
405
|
-
option :
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
puts
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
option :
|
428
|
-
|
429
|
-
#
|
430
|
-
#
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
optional_options
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
puts
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
#
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
puts
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
# - If
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
puts
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
#
|
524
|
-
#
|
525
|
-
#
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
puts
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
#
|
549
|
-
#
|
550
|
-
#
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
puts
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
#
|
579
|
-
#
|
580
|
-
#
|
581
|
-
#
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
option :
|
593
|
-
option :
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
puts
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
result
|
618
|
-
|
619
|
-
puts
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
629
|
-
#
|
630
|
-
#
|
631
|
-
#
|
632
|
-
#
|
633
|
-
#
|
634
|
-
#
|
635
|
-
#
|
636
|
-
#
|
637
|
-
#
|
638
|
-
#
|
639
|
-
#
|
640
|
-
#
|
641
|
-
#
|
642
|
-
#
|
643
|
-
#
|
644
|
-
#
|
645
|
-
#
|
646
|
-
#
|
647
|
-
#
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
puts to_output_hash(
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
)
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
)
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
)
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
)
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
)
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
puts
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
puts
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
# /api/dashboards/
|
872
|
-
desc '
|
873
|
-
def
|
874
|
-
optional_options_keys = optional_options(@_initializer).keys
|
875
|
-
optional_options = to_input_hash(optional_options_keys, options)
|
876
|
-
|
877
|
-
result = EmassClient::DashboardsApi.new.
|
878
|
-
options[:orgId], optional_options
|
879
|
-
)
|
880
|
-
puts to_output_hash(result).green
|
881
|
-
rescue EmassClient::ApiError => e
|
882
|
-
puts 'Exception when calling DashboardsApi->
|
883
|
-
puts to_output_hash(e)
|
884
|
-
end
|
885
|
-
|
886
|
-
# /api/dashboards/
|
887
|
-
desc '
|
888
|
-
def
|
889
|
-
optional_options_keys = optional_options(@_initializer).keys
|
890
|
-
optional_options = to_input_hash(optional_options_keys, options)
|
891
|
-
|
892
|
-
result = EmassClient::DashboardsApi.new.
|
893
|
-
options[:orgId], optional_options
|
894
|
-
)
|
895
|
-
puts to_output_hash(result).green
|
896
|
-
rescue EmassClient::ApiError => e
|
897
|
-
puts 'Exception when calling DashboardsApi->
|
898
|
-
puts to_output_hash(e)
|
899
|
-
end
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
desc '
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
end
|
949
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# rubocop:disable Naming/MethodName
|
4
|
+
|
5
|
+
# Hack class that properly formats the CLI help
|
6
|
+
class SubCommandBase < Thor
|
7
|
+
include OptionsParser
|
8
|
+
include InputConverters
|
9
|
+
include OutputConverters
|
10
|
+
|
11
|
+
# We do not control the method declaration for the banner
|
12
|
+
|
13
|
+
# rubocop:disable Style/OptionalBooleanParameter
|
14
|
+
def self.banner(command, _namespace = nil, subcommand = false)
|
15
|
+
# Use the $thor_runner (declared by the Thor CLI framework)
|
16
|
+
# to properly format the help text of sub-sub-commands.
|
17
|
+
|
18
|
+
# rubocop:disable Style/GlobalVars
|
19
|
+
if ancestors[0].to_s.include? '::Get'
|
20
|
+
"#{basename} #{command.formatted_usage(self, $thor_runner, subcommand)}"
|
21
|
+
else
|
22
|
+
"#{basename} get #{command.formatted_usage(self, $thor_runner, subcommand)}"
|
23
|
+
end
|
24
|
+
# rubocop:enable Style/GlobalVars
|
25
|
+
end
|
26
|
+
# rubocop:enable Style/OptionalBooleanParameter
|
27
|
+
end
|
28
|
+
|
29
|
+
module Emasser
|
30
|
+
# The Test Connection endpoint is provided by eMASS to verify and troubleshoot the
|
31
|
+
# connection to the web service.
|
32
|
+
#
|
33
|
+
# Endpoint:
|
34
|
+
# /api - Test connection to the API
|
35
|
+
class Test < SubCommandBase
|
36
|
+
def self.exit_on_failure?
|
37
|
+
true
|
38
|
+
end
|
39
|
+
|
40
|
+
desc 'connection', 'Test connection to the API'
|
41
|
+
|
42
|
+
def connection
|
43
|
+
result = EmassClient::TestApi.new.test_connection
|
44
|
+
puts to_output_hash(result).green
|
45
|
+
rescue EmassClient::ApiError => e
|
46
|
+
puts 'Exception when calling TestApi->test_connection'.red
|
47
|
+
puts to_output_hash(e).yellow
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# The Systems endpoints provide the ability to view system information.
|
52
|
+
#
|
53
|
+
# Endpoint:
|
54
|
+
# /api/systems - Get system information
|
55
|
+
# /api/systems/{systemId} - Get system information for a specific system
|
56
|
+
class System < SubCommandBase
|
57
|
+
def self.exit_on_failure?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
desc 'id [--system_name [SYSTEM_NAME]] [--system_owner [SYSTEM_OWNER]]',
|
62
|
+
'Attempts to provide system ID of a system with name [NAME] and owner [SYSTEM_OWNER]'
|
63
|
+
|
64
|
+
# Required parameters/fields
|
65
|
+
option :system_name
|
66
|
+
option :system_owner
|
67
|
+
|
68
|
+
def id
|
69
|
+
if options[:system_name].nil? && options[:system_owner].nil?
|
70
|
+
raise ArgumentError,
|
71
|
+
'SYSTEM_NAME or SYSTEM_OWNER is required'
|
72
|
+
end
|
73
|
+
|
74
|
+
begin
|
75
|
+
results = EmassClient::SystemsApi.new.get_systems
|
76
|
+
results = filter_systems(results, options[:system_name], options[:system_owner])
|
77
|
+
results.each { |result| puts "#{result[:systemId]} - #{result[:systemOwner]} - #{result[:name]}" }
|
78
|
+
rescue EmassClient::ApiError => e
|
79
|
+
puts 'Exception when calling SystemsApi->get_systems'
|
80
|
+
puts to_output_hash(e).yellow
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
85
|
+
no_commands do
|
86
|
+
def filter_systems(results, system_name = nil, system_owner = nil)
|
87
|
+
results = results.to_body if results.respond_to?(:to_body)
|
88
|
+
if system_owner.nil?
|
89
|
+
results[:data].filter { |result| result[:name].eql?(system_name) }
|
90
|
+
elsif system_name.nil?
|
91
|
+
results[:data].filter { |result| result[:systemOwner].eql?(system_owner) }
|
92
|
+
else
|
93
|
+
results[:data].filter { |result| result[:name].eql?(system_name) && result[:systemOwner].eql?(system_owner) }
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
98
|
+
|
99
|
+
desc 'byId [options]', 'Retrieve a system - filtered by [options] params'
|
100
|
+
option :systemId, type: :numeric, required: true,
|
101
|
+
desc: 'A numeric value representing the system identification'
|
102
|
+
option :includePackage, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
103
|
+
option :policy, type: :string, required: false, enum: %w[diacap rmf reporting]
|
104
|
+
|
105
|
+
def byId
|
106
|
+
optional_options_keys = optional_options(@_initializer).keys
|
107
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
108
|
+
# optional_options.merge!(Emasser::GET_SYSTEM_RETURN_TYPE)
|
109
|
+
|
110
|
+
begin
|
111
|
+
# Get system information matching provided parameters
|
112
|
+
result = EmassClient::SystemsApi.new.get_system(options[:systemId], optional_options)
|
113
|
+
puts to_output_hash(result).green
|
114
|
+
rescue EmassClient::ApiError => e
|
115
|
+
puts 'Exception when calling SystemsApi->get_system'.red
|
116
|
+
puts to_output_hash(e).yellow
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
class Systems < SubCommandBase
|
122
|
+
def self.exit_on_failure?
|
123
|
+
true
|
124
|
+
end
|
125
|
+
|
126
|
+
desc 'all [options]', 'Retrieves all available system(s) - filtered by [options] params'
|
127
|
+
# Optional parameters/fields
|
128
|
+
option :registrationType,
|
129
|
+
type: :string, required: false,
|
130
|
+
enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider]
|
131
|
+
option :ditprId, type: :string, required: false,
|
132
|
+
desc: 'DoD Information Technology (IT) Portfolio Repository (DITPR) string Id'
|
133
|
+
option :coamsId, type: :string, required: false,
|
134
|
+
desc: 'Cyber Operational Attributes Management System (COAMS) string Id'
|
135
|
+
option :policy, type: :string, required: false, enum: %w[diacap rmf reporting]
|
136
|
+
|
137
|
+
option :includePackage, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
138
|
+
option :includeDitprMetrics, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
139
|
+
option :includeDecommissioned, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
140
|
+
option :reportsForScorecard, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
141
|
+
|
142
|
+
def all
|
143
|
+
optional_options_keys = optional_options(@_initializer).keys
|
144
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
145
|
+
# optional_options.merge!(Emasser::GET_SYSTEM_RETURN_TYPE)
|
146
|
+
|
147
|
+
begin
|
148
|
+
# Get system information matching provided parameters
|
149
|
+
result = EmassClient::SystemsApi.new.get_systems(optional_options)
|
150
|
+
puts to_output_hash(result).green
|
151
|
+
rescue EmassClient::ApiError => e
|
152
|
+
puts 'Exception when calling SystemsApi->get_systems'.red
|
153
|
+
puts to_output_hash(e).yellow
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# The System Roles endpoints provides the ability to access user data assigned to systems.
|
159
|
+
# Notes:
|
160
|
+
# The endpoint can access three different role categories: PAC, CAC, and Other.
|
161
|
+
# If a system is dual-policy enabled, the returned system role information will default
|
162
|
+
# to the RMF policy information unless otherwise specified.
|
163
|
+
#
|
164
|
+
# Endpoint:
|
165
|
+
# /api/system-roles - Get all available roles
|
166
|
+
# /api/system-roles/{roleCategory} - Get system roles for provided role catgory
|
167
|
+
class Roles < SubCommandBase
|
168
|
+
def self.exit_on_failure?
|
169
|
+
true
|
170
|
+
end
|
171
|
+
|
172
|
+
desc 'all', 'Retrieves all available system roles'
|
173
|
+
|
174
|
+
def all
|
175
|
+
result = EmassClient::SystemRolesApi.new.get_system_roles
|
176
|
+
puts to_output_hash(result).green
|
177
|
+
rescue EmassClient::ApiError => e
|
178
|
+
puts 'Exception when calling SystemRolesApi->get_system_roles'.red
|
179
|
+
puts to_output_hash(e).yellow
|
180
|
+
end
|
181
|
+
|
182
|
+
desc 'byCategory [options]', 'Retrieves role(s) - filtered by [options] params'
|
183
|
+
# Required parameters/fields
|
184
|
+
option :roleCategory, type: :string, required: true, enum: %w[PAC CAC Other]
|
185
|
+
option :role, type: :string, required: true,
|
186
|
+
enum: ['AO', 'Auditor', 'Artifact Manager', 'C&A Team', 'IAO',
|
187
|
+
'ISSO', 'PM/IAM', 'SCA', 'User Rep', 'Validator']
|
188
|
+
# Optional parameters/fields
|
189
|
+
option :policy, type: :string, required: false, default: 'rmf', enum: %w[diacap rmf reporting]
|
190
|
+
option :includeDecommissioned, type: :boolean, required: false, desc: 'BOOLEAN - true or false.'
|
191
|
+
|
192
|
+
def byCategory
|
193
|
+
optional_options_keys = optional_options(@_initializer).keys
|
194
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
195
|
+
|
196
|
+
begin
|
197
|
+
result = EmassClient::SystemRolesApi.new.get_system_roles_by_category_id(options[:roleCategory],
|
198
|
+
options[:role], optional_options)
|
199
|
+
puts to_output_hash(result).green
|
200
|
+
rescue EmassClient::ApiError => e
|
201
|
+
puts 'Exception when calling SystemRolesApi->get_system_by_role_category_id'.red
|
202
|
+
puts to_output_hash(e).yellow
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
# The Controls endpoints provide the ability to view Security Control information
|
208
|
+
# of a system for both the Implementation Plan and Risk Assessment.
|
209
|
+
#
|
210
|
+
# Endpoint:
|
211
|
+
# /api/systems/{systemId}/controls - Get control information in a system for one or many controls
|
212
|
+
class Controls < SubCommandBase
|
213
|
+
def self.exit_on_failure?
|
214
|
+
true
|
215
|
+
end
|
216
|
+
|
217
|
+
desc 'forSystem', 'Get control information in a system for one or many controls (acronym)'
|
218
|
+
# Required parameters/fields
|
219
|
+
option :systemId, type: :numeric, required: true,
|
220
|
+
desc: 'A numeric value representing the system identification'
|
221
|
+
# Optional parameters/fields
|
222
|
+
option :acronyms, type: :string, required: false,
|
223
|
+
desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all controls for systemId are returned'
|
224
|
+
|
225
|
+
def forSystem
|
226
|
+
optional_options_keys = optional_options(@_initializer).keys
|
227
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
228
|
+
|
229
|
+
begin
|
230
|
+
result = EmassClient::ControlsApi.new.get_system_controls(options[:systemId], optional_options)
|
231
|
+
puts to_output_hash(result).green
|
232
|
+
rescue EmassClient::ApiError => e
|
233
|
+
puts 'Exception when calling ControlsApi->get_system_controls'.red
|
234
|
+
puts to_output_hash(e).yellow
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# The Test Results endpoints provide the ability to view test results for a
|
240
|
+
# system's Assessment Procedures (CCIs) which determine Security Control compliance.
|
241
|
+
#
|
242
|
+
# Endpoint:
|
243
|
+
# /api/systems/{systemId}/test-results - Get one or many test results in a system
|
244
|
+
class TestResults < SubCommandBase
|
245
|
+
def self.exit_on_failure?
|
246
|
+
true
|
247
|
+
end
|
248
|
+
|
249
|
+
desc 'forSystem', 'Get one or many test results in a system'
|
250
|
+
# Required parameters/fields
|
251
|
+
option :systemId, type: :numeric, required: true,
|
252
|
+
desc: 'A numeric value representing the system identification'
|
253
|
+
# Optional parameters/fields
|
254
|
+
option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
|
255
|
+
option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value'
|
256
|
+
option :latestOnly, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
257
|
+
|
258
|
+
def forSystem
|
259
|
+
optional_options_keys = optional_options(@_initializer).keys
|
260
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
261
|
+
|
262
|
+
begin
|
263
|
+
result = EmassClient::TestResultsApi.new.get_system_test_results(options[:systemId], optional_options)
|
264
|
+
puts to_output_hash(result).green
|
265
|
+
rescue EmassClient::ApiError => e
|
266
|
+
puts 'Exception when calling TestResultsApi->get_system_test_results'.red
|
267
|
+
puts to_output_hash(e).yellow
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# The POA&Ms endpoints provide the ability to view Plan of Action and Milestones (POA&M)
|
273
|
+
# items and associated milestones for a system.
|
274
|
+
#
|
275
|
+
# Endpoint:
|
276
|
+
# /api/systems/{systemId}/poams - Get one or many POA&M items in a system
|
277
|
+
# /api/systems/{systemId}/poams/{poamId} - Get POA&M item by ID in a system
|
278
|
+
class Poams < SubCommandBase
|
279
|
+
def self.exit_on_failure?
|
280
|
+
true
|
281
|
+
end
|
282
|
+
|
283
|
+
# BY SYSTEM ID ------------------------------------------------------------------
|
284
|
+
desc 'forSystem', 'Get one or many POA&M items in a system'
|
285
|
+
# Required parameters/fields
|
286
|
+
option :systemId, type: :numeric, required: true,
|
287
|
+
desc: 'A numeric value representing the system identification'
|
288
|
+
# Optional parameters/fields
|
289
|
+
option :scheduledCompletionDateStart, type: :numeric, required: false,
|
290
|
+
desc: 'The schedule completion start date - Unix time format.'
|
291
|
+
option :scheduledCompletionDateEnd, type: :numeric, required: false,
|
292
|
+
desc: 'The scheduled completion end date - Unix time format.'
|
293
|
+
option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1" or "AC-1, AC-2"'
|
294
|
+
option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value e.g "000123" or "000123,000069"'
|
295
|
+
option :systemOnly, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
296
|
+
|
297
|
+
def forSystem
|
298
|
+
optional_options_keys = optional_options(@_initializer).keys
|
299
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
300
|
+
|
301
|
+
begin
|
302
|
+
result = EmassClient::POAMApi.new.get_system_poams(options[:systemId], optional_options)
|
303
|
+
puts to_output_hash(result).green
|
304
|
+
rescue EmassClient::ApiError => e
|
305
|
+
puts 'Exception when calling POAMApi->get_system_poams'.red
|
306
|
+
puts to_output_hash(e).yellow
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
# BY POAM ID --------------------------------------------------------------
|
311
|
+
desc 'byPoamId', 'Get POA&M item for given systemId and poamId'
|
312
|
+
# Required parameters/fields
|
313
|
+
option :systemId, type: :numeric, required: true,
|
314
|
+
desc: 'A numeric value representing the system identification'
|
315
|
+
option :poamId, type: :numeric, required: true,
|
316
|
+
desc: 'A numeric value representing the poam identification'
|
317
|
+
|
318
|
+
def byPoamId
|
319
|
+
result = EmassClient::POAMApi.new.get_system_poams_by_poam_id(options[:systemId], options[:poamId])
|
320
|
+
puts to_output_hash(result).green
|
321
|
+
rescue EmassClient::ApiError => e
|
322
|
+
puts 'Exception when calling POAMApi->get_system_poams_by_poam_id'.red
|
323
|
+
puts to_output_hash(e).yellow
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
# The Milestones endpoints provide the ability to view milestones that are associated
|
328
|
+
# with Plan of Action and Milestones (POA&M) items for a system.
|
329
|
+
#
|
330
|
+
# /api/systems/{systemId}/poams/{poamId}/milestones - Get milestones in one or many POA&M items in a system
|
331
|
+
# /api/systems/{systemId}/poams/{poamId}/milestones/{milestoneId} - Get milestone by ID in POA&M item in a system
|
332
|
+
class Milestones < SubCommandBase
|
333
|
+
def self.exit_on_failure?
|
334
|
+
true
|
335
|
+
end
|
336
|
+
# MILSTONES by SYSTEM and POAM ID -----------------------------------------
|
337
|
+
desc 'byPoamId', 'Get milestone(s) for given specified system and poam'
|
338
|
+
# Required parameters/fields
|
339
|
+
option :systemId, type: :numeric, required: true,
|
340
|
+
desc: 'A numeric value representing the system identification'
|
341
|
+
option :poamId, type: :numeric, required: true,
|
342
|
+
desc: 'A numeric value representing the poam identification'
|
343
|
+
# Optional parameters/fields
|
344
|
+
option :scheduledCompletionDateStart, type: :numeric, required: false,
|
345
|
+
desc: 'The schedule completion start date - Unix time format.'
|
346
|
+
option :scheduledCompletionDateEnd, type: :numeric, required: false,
|
347
|
+
desc: 'The scheduled completion end date - Unix time format.'
|
348
|
+
|
349
|
+
def byPoamId
|
350
|
+
optional_options_keys = optional_options(@_initializer).keys
|
351
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
352
|
+
|
353
|
+
begin
|
354
|
+
# Get milestones in one or many poa&m items in a system
|
355
|
+
result = EmassClient::MilestonesApi.new.get_system_milestones_by_poam_id(options[:systemId],
|
356
|
+
options[:poamId], optional_options)
|
357
|
+
puts to_output_hash(result).green
|
358
|
+
rescue EmassClient::ApiError => e
|
359
|
+
puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id'.red
|
360
|
+
puts to_output_hash(e).yellow
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
364
|
+
# MILSTONES by SYSTEM, POAM, and MILESTONE ID -----------------------------------------
|
365
|
+
desc 'byMilestoneId', 'Get milestone(s) for given specified system, poam, and milestone Id'
|
366
|
+
# Required parameters/fields
|
367
|
+
option :systemId, type: :numeric, required: true,
|
368
|
+
desc: 'A numeric value representing the system identification'
|
369
|
+
option :poamId, type: :numeric, required: true,
|
370
|
+
desc: 'A numeric value representing the poam identification'
|
371
|
+
option :milestoneId, type: :numeric, required: true,
|
372
|
+
desc: 'A numeric value representing the milestone identification'
|
373
|
+
|
374
|
+
def byMilestoneId
|
375
|
+
result = EmassClient::MilestonesApi.new.get_system_milestones_by_poam_id_and_milestone_id(
|
376
|
+
options[:systemId], options[:poamId], options[:milestoneId]
|
377
|
+
)
|
378
|
+
puts to_output_hash(result).green
|
379
|
+
rescue EmassClient::ApiError => e
|
380
|
+
puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id_and_milestone_id'.red
|
381
|
+
puts to_output_hash(e).yellow
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
# The Artifact endpoints provide the ability to add new Artifacts
|
386
|
+
# (supporting documentation/evidence for Security Control Assessments
|
387
|
+
# and system Authorization activities) to a system.
|
388
|
+
#
|
389
|
+
# Endpoints:
|
390
|
+
# /api/systems/{systemId}/artifacts - Get one or many artifacts in a system
|
391
|
+
# /api/systems/{systemId}/artifacts-export - Get the file of an artifact in a system
|
392
|
+
class Artifacts < SubCommandBase
|
393
|
+
def self.exit_on_failure?
|
394
|
+
true
|
395
|
+
end
|
396
|
+
|
397
|
+
desc 'forSystem', 'Get all system artifacts for a system Id'
|
398
|
+
# Required parameters/fields
|
399
|
+
option :systemId, type: :numeric, required: true,
|
400
|
+
desc: 'A numeric value representing the system identification'
|
401
|
+
# Optional parameters/fields
|
402
|
+
option :filename, type: :string, required: false, desc: 'The artifact file name'
|
403
|
+
option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
|
404
|
+
option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value'
|
405
|
+
option :systemOnly, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
406
|
+
|
407
|
+
def forSystem
|
408
|
+
optional_options_keys = optional_options(@_initializer).keys
|
409
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
410
|
+
|
411
|
+
begin
|
412
|
+
# Get one or many artifacts in a system
|
413
|
+
result = EmassClient::ArtifactsApi.new.get_system_artifacts(options[:systemId],
|
414
|
+
optional_options)
|
415
|
+
puts to_output_hash(result).green
|
416
|
+
rescue EmassClient::ApiError => e
|
417
|
+
puts 'Exception when calling ArtifactsApi->get_system_artifacts'.red
|
418
|
+
puts to_output_hash(e).yellow
|
419
|
+
end
|
420
|
+
end
|
421
|
+
|
422
|
+
desc 'export', 'Get artifact binary file associated with given filename'
|
423
|
+
# Required parameters/fields
|
424
|
+
option :systemId, type: :numeric, required: true,
|
425
|
+
desc: 'A numeric value representing the system identification'
|
426
|
+
option :filename, type: :string, required: true, desc: 'The artifact file name'
|
427
|
+
option :compress, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
428
|
+
# NOTE: compress is a required parameter, however Thor does not allow a boolean type to be required because it
|
429
|
+
# automatically creates a --no-compress option, which is confusing in the help output:
|
430
|
+
# [--compress], [--no-compress] # BOOLEAN - true or false.
|
431
|
+
|
432
|
+
def export
|
433
|
+
optional_options_keys = optional_options(@_initializer).keys
|
434
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
435
|
+
optional_options.merge!(Emasser::GET_ARTIFACTS_RETURN_TYPE)
|
436
|
+
|
437
|
+
result = EmassClient::ArtifactsExportApi.new.get_system_artifacts_export(
|
438
|
+
options[:systemId], options[:filename], optional_options
|
439
|
+
)
|
440
|
+
if options[:compress]
|
441
|
+
pp result
|
442
|
+
else
|
443
|
+
begin
|
444
|
+
puts JSON.pretty_generate(JSON.parse(result)).green
|
445
|
+
rescue StandardError
|
446
|
+
puts result.red
|
447
|
+
end
|
448
|
+
end
|
449
|
+
rescue EmassClient::ApiError => e
|
450
|
+
puts 'Exception when calling ArtifactsApi->get_system_artifacts_export'.red
|
451
|
+
puts to_output_hash(e).yellow
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
# The Control Approval Chain (CAC) endpoints provide the ability to view the status of
|
456
|
+
# Security Controls and submit them to the second stage in the Control Approval Chain
|
457
|
+
# Note:
|
458
|
+
# POST requests will only yield successful results if the Security Control is at the first
|
459
|
+
# stage of the CAC. If the control is not at the first stage, an error will be returned.
|
460
|
+
#
|
461
|
+
# Endpoints:
|
462
|
+
# /api/systems/{systemId}/approval/cac - Get location of one or many controls in CAC
|
463
|
+
class CAC < SubCommandBase
|
464
|
+
def self.exit_on_failure?
|
465
|
+
true
|
466
|
+
end
|
467
|
+
|
468
|
+
desc 'controls', 'Get location of one or many controls in CAC'
|
469
|
+
# Required parameters/fields
|
470
|
+
option :systemId, type: :numeric, required: true,
|
471
|
+
desc: 'A numeric value representing the system identification'
|
472
|
+
# Optional parameters/fields
|
473
|
+
option :controlAcronyms, type: :string, required: false,
|
474
|
+
desc: 'The system acronym(s) e.g "AC-1, AC-2" - if not provided all CACs for systemId are returned'
|
475
|
+
|
476
|
+
def controls
|
477
|
+
optional_options_keys = optional_options(@_initializer).keys
|
478
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
479
|
+
|
480
|
+
begin
|
481
|
+
# Get location of one or many controls in CAC
|
482
|
+
result = EmassClient::CACApi.new.get_system_cac(options[:systemId], optional_options)
|
483
|
+
puts to_output_hash(result).green
|
484
|
+
rescue EmassClient::ApiError => e
|
485
|
+
puts 'Exception when calling ApprovalChainApi->get_system_cac'.red
|
486
|
+
puts to_output_hash(e).yellow
|
487
|
+
end
|
488
|
+
end
|
489
|
+
end
|
490
|
+
|
491
|
+
# The Package Approval Chain (PAC) endpoints provide the ability to view the
|
492
|
+
# status of existing workflows and initiate new workflows for a system.
|
493
|
+
#
|
494
|
+
# Notes:
|
495
|
+
# - If the indicated system has any active workflows, the response will include
|
496
|
+
# information such as the workflow type and the current stage of each workflow.
|
497
|
+
# - If there are no active workflows, then a null data member will be returned.
|
498
|
+
#
|
499
|
+
# Endpoints:
|
500
|
+
# /api/systems/{systemId}/approval/pac - Get location of system package in PAC
|
501
|
+
class PAC < SubCommandBase
|
502
|
+
def self.exit_on_failure?
|
503
|
+
true
|
504
|
+
end
|
505
|
+
|
506
|
+
desc 'package', 'Get location of system package in PAC'
|
507
|
+
# Required parameters/fields
|
508
|
+
option :systemId, type: :numeric, required: true,
|
509
|
+
desc: 'A numeric value representing the system identification'
|
510
|
+
|
511
|
+
def package
|
512
|
+
# Get location of system package in PAC
|
513
|
+
result = EmassClient::PACApi.new.get_system_pac(options[:systemId])
|
514
|
+
puts to_output_hash(result).green
|
515
|
+
rescue EmassClient::ApiError => e
|
516
|
+
puts 'Exception when calling ApprovalChainApi->get_system_'.red
|
517
|
+
puts to_output_hash(e).yellow
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
521
|
+
# The Cybersecurity Maturity Model Certification (CMMC) Assessments endpoint provides
|
522
|
+
# the ability to view CMMC assessment information. It is available to CMMC eMASS only.
|
523
|
+
#
|
524
|
+
# Endpoints:
|
525
|
+
# /api/cmmc-assessments - Get CMMC assessment information
|
526
|
+
class CMMC < SubCommandBase
|
527
|
+
def self.exit_on_failure?
|
528
|
+
true
|
529
|
+
end
|
530
|
+
|
531
|
+
desc 'assessments', 'Get CMMC assessment information'
|
532
|
+
long_desc Help.text(:cmmc_get_mapper)
|
533
|
+
|
534
|
+
# Required parameters/fields
|
535
|
+
option :sinceDate, type: :string, required: true, desc: 'The CMMC date. Unix date format'
|
536
|
+
|
537
|
+
def assessments
|
538
|
+
result = EmassClient::CMMCAssessmentsApi.new.get_cmmc_assessments(options[:sinceDate])
|
539
|
+
puts to_output_hash(result).green
|
540
|
+
rescue EmassClient::ApiError => e
|
541
|
+
puts 'Exception when calling ApprovalChainApi->get_cmmc_assessments'.red
|
542
|
+
puts to_output_hash(e).yellow
|
543
|
+
end
|
544
|
+
end
|
545
|
+
|
546
|
+
# The Workflow Definitions endpoint provides the ability to view all workflow schemas
|
547
|
+
# available on the eMASS instance. Every transition for each workflow stage is included.
|
548
|
+
#
|
549
|
+
# Endpoints:
|
550
|
+
# /api/workflow-definitions - Get workflow definitions in a site
|
551
|
+
class WorkflowDefinitions < SubCommandBase
|
552
|
+
def self.exit_on_failure?
|
553
|
+
true
|
554
|
+
end
|
555
|
+
|
556
|
+
desc 'forSite', 'Get location of system package in PAC'
|
557
|
+
|
558
|
+
# Optional parameters/fields
|
559
|
+
option :includeInactive, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
560
|
+
option :registrationType,
|
561
|
+
type: :string, required: false,
|
562
|
+
enum: %w[assessAndAuthorize assessOnly guest regular functional cloudServiceProvider commonControlProvider]
|
563
|
+
|
564
|
+
def forSite
|
565
|
+
optional_options_keys = optional_options(@_initializer).keys
|
566
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
567
|
+
|
568
|
+
result = EmassClient::WorkflowDefinitionsApi.new.get_workflow_definitions(optional_options)
|
569
|
+
puts to_output_hash(result).green
|
570
|
+
rescue EmassClient::ApiError => e
|
571
|
+
puts 'Exception when calling ApprovalChainApi->get_workflow_definitions'.red
|
572
|
+
puts to_output_hash(e).yellow
|
573
|
+
end
|
574
|
+
end
|
575
|
+
|
576
|
+
# The Workflow Instances endpoint provides the ability to view detailed information on all
|
577
|
+
# active and historical workflows for a system.
|
578
|
+
#
|
579
|
+
# Endpoints:
|
580
|
+
# /api/workflows/instances - Get workflow instances in a site
|
581
|
+
# /api/workflows/instances/{workflowInstanceId} - Get workflow instance by ID
|
582
|
+
class WorkflowInstances < SubCommandBase
|
583
|
+
def self.exit_on_failure?
|
584
|
+
true
|
585
|
+
end
|
586
|
+
|
587
|
+
desc 'all', 'Get workflow instances in a site'
|
588
|
+
|
589
|
+
# Optional parameters/fields
|
590
|
+
option :includeComments, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
591
|
+
option :pageIndex, type: :numeric, required: false, desc: 'The page number to be returned'
|
592
|
+
option :sinceDate, type: :string, required: false, desc: 'The workflow instance date. Unix date format'
|
593
|
+
option :status, type: :string, required: false, enum: %w[active inactive all]
|
594
|
+
|
595
|
+
def all
|
596
|
+
optional_options_keys = optional_options(@_initializer).keys
|
597
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
598
|
+
|
599
|
+
result = EmassClient::WorkflowInstancesApi.new.get_system_workflow_instances(optional_options)
|
600
|
+
puts to_output_hash(result).green
|
601
|
+
rescue EmassClient::ApiError => e
|
602
|
+
puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances'.red
|
603
|
+
puts to_output_hash(e).yellow
|
604
|
+
end
|
605
|
+
|
606
|
+
# Workflow by workflowInstanceId ---------------------------------------------------------
|
607
|
+
desc 'byInstanceId', 'Get workflow instance by ID'
|
608
|
+
|
609
|
+
# Required parameters/fields
|
610
|
+
option :workflowInstanceId, type: :numeric, required: true,
|
611
|
+
desc: 'A numeric value representing the workflowInstance identification'
|
612
|
+
|
613
|
+
def byInstanceId
|
614
|
+
opts = Emasser::GET_WORKFLOWINSTANCES_RETURN_TYPE
|
615
|
+
result = EmassClient::WorkflowInstancesApi.new
|
616
|
+
.get_system_workflow_instances_by_workflow_instance_id(options[:workflowInstanceId], opts)
|
617
|
+
puts to_output_hash(result).green
|
618
|
+
rescue EmassClient::ApiError => e
|
619
|
+
puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances_by_workflow_instance_id'.red
|
620
|
+
puts to_output_hash(e).yellow
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
# The Dashboards endpoints provide the ability to view data contained in dashboard exports.
|
625
|
+
# In the eMASS front end, these dashboard exports are generated as Excel exports.
|
626
|
+
# Each dashboard dataset available from the API is automatically updated with the current
|
627
|
+
# configuration of the dashboard and the instance of eMASS as the dashboard changes.
|
628
|
+
#
|
629
|
+
# Endpoints:
|
630
|
+
# /api/dashboards/system-status-details - Get systems status detail dashboard information
|
631
|
+
# /api/dashboards/system-control-compliance-summary - Get systems control compliance summary dashboard information
|
632
|
+
# /api/dashboards/system-security-controls-details - Get systems security control details dashboard information
|
633
|
+
# /api/dashboards/system-assessment-procedures-details - Get systems assessement procdures details dashboard information
|
634
|
+
# /api/dashboards/system-poam-summary - Get systems POA&Ms summary dashboard information
|
635
|
+
# /api/dashboards/system-poam-details - Get system POA&Ms details dashboard information
|
636
|
+
# /api/dashboards/system-artifacts-summary - Get system Artifacts summary information.
|
637
|
+
# /api/dashboards/system-artifacts-details - Get system Artifacts details information.
|
638
|
+
# /api/dashboards/system-hardware-summary - Get system hardware summary dashboard information
|
639
|
+
# /api/dashboards/system-hardware-details - Get system hardware details dashboard information
|
640
|
+
# /api/dashboards/system-sensor-hardware-summary - Get system sensor hardware summary dashboard information
|
641
|
+
# /api/dashboards/system-sensor-hardware-details - Get system sensor hardware details dashboard information
|
642
|
+
# /api/dashboards/system-software-summary - Get system software summary dashboard information
|
643
|
+
# /api/dashboards/system-software-details - Get system ssoftware details dashboard information
|
644
|
+
# /api/dashboards/system-ports-protocols-summary - Get system ports and protocols summary dashboard information
|
645
|
+
# /api/dashboards/system-ports-protocols-details - Get system ports and protocols details dashboard information
|
646
|
+
# /api/dashboards/system-conmon-integration-status-summary - Get system conmon integration status summary dashboard information
|
647
|
+
# /api/dashboards/system-associations-details - Get system associations details dashboard information
|
648
|
+
# /api/dashboards/user-system-assignments-details - Get user system assignments details dashboard information
|
649
|
+
# /api/dashboards/system-privacy-summary - Get user system privacy summary dashboard information
|
650
|
+
# /api/dashboards/va-omb-fisma-saop-summary - Get VA OMB-FISMA SAOP summary dashboard information
|
651
|
+
# /api/dashboards/va-system-aa-summary - Get VA system A&A summary dashboard information
|
652
|
+
# /api/dashboards/va-system-a2-summary - Get VA system A2.0 summary dashboard information
|
653
|
+
# /api/dashboards/va-system-pl-109-reporting-summary - Get workflow instance by ID in a system
|
654
|
+
# /api/dashboards/va-system-fisma-inventory-summary - Get VA system FISMA inventory summary dashboard information
|
655
|
+
# /api/dashboards/va-system-fisma-inventory-crypto-summary - Get VA system FISMA inventory crypto summary dashboard information
|
656
|
+
# /api/dashboards/va-system-threat-risks-summary - Get VA System Threat Risks Summary dashboard information
|
657
|
+
# /api/dashboards/va-system-threat-sources-details - Get VA System Threat Sources Details dashboard information
|
658
|
+
# /api/dashboards/va-system-threat-architecture-details - Get VA System Threat Architecture Details dashboard information
|
659
|
+
|
660
|
+
class Dashboards < SubCommandBase
|
661
|
+
def self.exit_on_failure?
|
662
|
+
true
|
663
|
+
end
|
664
|
+
|
665
|
+
# Required parameters/fields
|
666
|
+
class_option :orgId, aliases: '-o', type: :numeric,
|
667
|
+
desc: 'A numeric value representing the system identification'
|
668
|
+
|
669
|
+
# Optional parameters/fields
|
670
|
+
class_option :excludeinherited, aliases: '-I', type: :boolean, required: false, default: false,
|
671
|
+
desc: 'BOOLEAN - true or false, default false.'
|
672
|
+
class_option :pageIndex, aliases: '-i', type: :numeric, required: false,
|
673
|
+
desc: 'The page number to be returned, if not specified starts at page 0'
|
674
|
+
class_option :pageSize, aliases: '-s', type: :numeric, required: false,
|
675
|
+
desc: 'The total entries per page, default is 20,000'
|
676
|
+
|
677
|
+
#--------------------------------------------------------------------------
|
678
|
+
# System Status Dashboard
|
679
|
+
# /api/dashboards/system-status-details
|
680
|
+
desc 'status_details', 'Get systems status detail dashboard information'
|
681
|
+
def status_details
|
682
|
+
optional_options_keys = optional_options(@_initializer).keys
|
683
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
684
|
+
|
685
|
+
result = EmassClient::DashboardsApi.new.get_system_status_details(
|
686
|
+
options[:orgId], optional_options
|
687
|
+
)
|
688
|
+
puts to_output_hash(result).green
|
689
|
+
rescue EmassClient::ApiError => e
|
690
|
+
puts 'Exception when calling DashboardsApi->get_system_status_details'.red
|
691
|
+
puts to_output_hash(e)
|
692
|
+
end
|
693
|
+
|
694
|
+
#--------------------------------------------------------------------------
|
695
|
+
# Enterprise Security Controls Dashboard
|
696
|
+
# /api/dashboards/system-control-compliance-summary
|
697
|
+
desc 'control_compliance_summary', 'Get systems control compliance summary dashboard information'
|
698
|
+
def control_compliance_summary
|
699
|
+
optional_options_keys = optional_options(@_initializer).keys
|
700
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
701
|
+
|
702
|
+
result = EmassClient::DashboardsApi.new.get_system_control_compliance_summary(
|
703
|
+
options[:orgId], optional_options
|
704
|
+
)
|
705
|
+
puts to_output_hash(result).green
|
706
|
+
rescue EmassClient::ApiError => e
|
707
|
+
puts 'Exception when calling DashboardsApi->get_system_control_compliance_summary'.red
|
708
|
+
puts to_output_hash(e)
|
709
|
+
end
|
710
|
+
|
711
|
+
# /api/dashboards/system-security-controls-details
|
712
|
+
desc 'security_control_details', 'Get systems security control details dashboard information'
|
713
|
+
def security_control_details
|
714
|
+
optional_options_keys = optional_options(@_initializer).keys
|
715
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
716
|
+
|
717
|
+
result = EmassClient::DashboardsApi.new.get_system_security_control_details(
|
718
|
+
options[:orgId], optional_options
|
719
|
+
)
|
720
|
+
puts to_output_hash(result).green
|
721
|
+
rescue EmassClient::ApiError => e
|
722
|
+
puts 'Exception when calling DashboardsApi->get_system_security_control_details'.red
|
723
|
+
puts to_output_hash(e)
|
724
|
+
end
|
725
|
+
|
726
|
+
# /api/dashboards/system-assessment-procedures-details
|
727
|
+
desc 'assessment_procedures_details', 'Get systems assessement procdures details dashboard information'
|
728
|
+
def assessment_procedures_details
|
729
|
+
optional_options_keys = optional_options(@_initializer).keys
|
730
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
731
|
+
|
732
|
+
result = EmassClient::DashboardsApi.new.get_system_assessment_procedures_details(
|
733
|
+
options[:orgId], optional_options
|
734
|
+
)
|
735
|
+
puts to_output_hash(result).green
|
736
|
+
rescue EmassClient::ApiError => e
|
737
|
+
puts 'Exception when calling DashboardsApi->get_system_assessment_procedures_details'.red
|
738
|
+
puts to_output_hash(e)
|
739
|
+
end
|
740
|
+
|
741
|
+
#--------------------------------------------------------------------------
|
742
|
+
# Enterprise POA&M Dashboard
|
743
|
+
# /api/dashboards/system-poam-summary
|
744
|
+
desc 'poam_summary', 'Get systems POA&Ms summary dashboard information'
|
745
|
+
def poam_summary
|
746
|
+
optional_options_keys = optional_options(@_initializer).keys
|
747
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
748
|
+
|
749
|
+
result = EmassClient::DashboardsApi.new.get_system_poam_summary(
|
750
|
+
options[:orgId], optional_options
|
751
|
+
)
|
752
|
+
puts to_output_hash(result).green
|
753
|
+
rescue EmassClient::ApiError => e
|
754
|
+
puts 'Exception when calling DashboardsApi->get_system_poam_summary'.red
|
755
|
+
puts to_output_hash(e)
|
756
|
+
end
|
757
|
+
|
758
|
+
# /api/dashboards/system-poam-details
|
759
|
+
desc 'poam_details', 'Get system POA&Ms details dashboard information'
|
760
|
+
def poam_details
|
761
|
+
optional_options_keys = optional_options(@_initializer).keys
|
762
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
763
|
+
|
764
|
+
result = EmassClient::DashboardsApi.new.get_system_poam_details(
|
765
|
+
options[:orgId], optional_options
|
766
|
+
)
|
767
|
+
puts to_output_hash(result).green
|
768
|
+
rescue EmassClient::ApiError => e
|
769
|
+
puts 'Exception when calling DashboardsApi->get_system_poam_details'.red
|
770
|
+
puts to_output_hash(e)
|
771
|
+
end
|
772
|
+
|
773
|
+
#--------------------------------------------------------------------------
|
774
|
+
# Enterprise Artifacts Dashboard
|
775
|
+
# /api/dashboards/system-artifacts-summary
|
776
|
+
desc 'artifacts_summary', 'Get systems artifacts summary dashboard information'
|
777
|
+
def artifacts_summary
|
778
|
+
optional_options_keys = optional_options(@_initializer).keys
|
779
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
780
|
+
|
781
|
+
result = EmassClient::DashboardsApi.new.get_system_artifacts_summary(
|
782
|
+
options[:orgId], optional_options
|
783
|
+
)
|
784
|
+
puts to_output_hash(result).green
|
785
|
+
rescue EmassClient::ApiError => e
|
786
|
+
puts 'Exception when calling DashboardsApi->get_system_artifacts_summary'.red
|
787
|
+
puts to_output_hash(e)
|
788
|
+
end
|
789
|
+
|
790
|
+
# /api/dashboards/system-artifacts-details
|
791
|
+
desc 'artifacts_details', 'Get systems artifacts summary dashboard information'
|
792
|
+
def artifacts_details
|
793
|
+
optional_options_keys = optional_options(@_initializer).keys
|
794
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
795
|
+
|
796
|
+
result = EmassClient::DashboardsApi.new.get_system_artifacts_details(
|
797
|
+
options[:orgId], optional_options
|
798
|
+
)
|
799
|
+
puts to_output_hash(result).green
|
800
|
+
rescue EmassClient::ApiError => e
|
801
|
+
puts 'Exception when calling DashboardsApi->get_system_artifacts_details'.red
|
802
|
+
puts to_output_hash(e)
|
803
|
+
end
|
804
|
+
|
805
|
+
#--------------------------------------------------------------------------
|
806
|
+
# Hardware Baseline Dashboard
|
807
|
+
# /api/dashboards/system-hardware-summary
|
808
|
+
desc 'hardware_summary', 'Get system hardware summary dashboard information'
|
809
|
+
def hardware_summary
|
810
|
+
optional_options_keys = optional_options(@_initializer).keys
|
811
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
812
|
+
|
813
|
+
result = EmassClient::DashboardsApi.new.get_system_hardware_summary(
|
814
|
+
options[:orgId], optional_options
|
815
|
+
)
|
816
|
+
puts to_output_hash(result).green
|
817
|
+
rescue EmassClient::ApiError => e
|
818
|
+
puts 'Exception when calling DashboardsApi->get_system_hardware_summary'.red
|
819
|
+
puts to_output_hash(e)
|
820
|
+
end
|
821
|
+
|
822
|
+
# /api/dashboards/system-hardware-details
|
823
|
+
desc 'hardware_details', 'Get system hardware details dashboard information'
|
824
|
+
def hardware_details
|
825
|
+
optional_options_keys = optional_options(@_initializer).keys
|
826
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
827
|
+
|
828
|
+
result = EmassClient::DashboardsApi.new.get_system_hardware_details(
|
829
|
+
options[:orgId], optional_options
|
830
|
+
)
|
831
|
+
puts to_output_hash(result).green
|
832
|
+
rescue EmassClient::ApiError => e
|
833
|
+
puts 'Exception when calling DashboardsApi->get_system_hardware_details'.red
|
834
|
+
puts to_output_hash(e)
|
835
|
+
end
|
836
|
+
|
837
|
+
#--------------------------------------------------------------------------
|
838
|
+
# Enterprise Sensor-based Hardware Resources Dashboard
|
839
|
+
# /api/dashboards/system-sensor-hardware-summary
|
840
|
+
desc 'sensor_hardware_summary', 'Get system sensor hardware summary dashboard information'
|
841
|
+
def sensor_hardware_summary
|
842
|
+
optional_options_keys = optional_options(@_initializer).keys
|
843
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
844
|
+
|
845
|
+
result = EmassClient::DashboardsApi.new.get_system_sensor_hardware_summary(
|
846
|
+
options[:orgId], optional_options
|
847
|
+
)
|
848
|
+
puts to_output_hash(result).green
|
849
|
+
rescue EmassClient::ApiError => e
|
850
|
+
puts 'Exception when calling DashboardsApi->get_system_sensor_hardware_summary'.red
|
851
|
+
puts to_output_hash(e)
|
852
|
+
end
|
853
|
+
|
854
|
+
# /api/dashboards/system-sensor-hardware-details
|
855
|
+
desc 'sensor_hardware_details', 'Get system sensor hardware details dashboard information'
|
856
|
+
def sensor_hardware_details
|
857
|
+
optional_options_keys = optional_options(@_initializer).keys
|
858
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
859
|
+
|
860
|
+
result = EmassClient::DashboardsApi.new.get_system_sensor_hardware_details(
|
861
|
+
options[:orgId], optional_options
|
862
|
+
)
|
863
|
+
puts to_output_hash(result).green
|
864
|
+
rescue EmassClient::ApiError => e
|
865
|
+
puts 'Exception when calling DashboardsApi->get_system_sensor_hardware_details'.red
|
866
|
+
puts to_output_hash(e)
|
867
|
+
end
|
868
|
+
|
869
|
+
#--------------------------------------------------------------------------
|
870
|
+
# Software Baseline Dashboards
|
871
|
+
# /api/dashboards/system-software-summary
|
872
|
+
desc 'software_summary', 'Get system software summary dashboard information'
|
873
|
+
def software_summary
|
874
|
+
optional_options_keys = optional_options(@_initializer).keys
|
875
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
876
|
+
|
877
|
+
result = EmassClient::DashboardsApi.new.get_system_software_summary(
|
878
|
+
options[:orgId], optional_options
|
879
|
+
)
|
880
|
+
puts to_output_hash(result).green
|
881
|
+
rescue EmassClient::ApiError => e
|
882
|
+
puts 'Exception when calling DashboardsApi->get_system_software_summary'.red
|
883
|
+
puts to_output_hash(e)
|
884
|
+
end
|
885
|
+
|
886
|
+
# /api/dashboards/system-software-details
|
887
|
+
desc 'software_details', 'Get system software details dashboard information'
|
888
|
+
def software_details
|
889
|
+
optional_options_keys = optional_options(@_initializer).keys
|
890
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
891
|
+
|
892
|
+
result = EmassClient::DashboardsApi.new.get_system_software_details(
|
893
|
+
options[:orgId], optional_options
|
894
|
+
)
|
895
|
+
puts to_output_hash(result).green
|
896
|
+
rescue EmassClient::ApiError => e
|
897
|
+
puts 'Exception when calling DashboardsApi->get_system_software_details'.red
|
898
|
+
puts to_output_hash(e)
|
899
|
+
end
|
900
|
+
|
901
|
+
#--------------------------------------------------------------------------
|
902
|
+
# Ports and Protocols Dashboard
|
903
|
+
# /api/dashboards/system-ports-protocols-summary
|
904
|
+
desc 'ports_protocols_summary', 'Get system ports & portocols summary dashboard information'
|
905
|
+
def ports_protocols_summary
|
906
|
+
optional_options_keys = optional_options(@_initializer).keys
|
907
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
908
|
+
|
909
|
+
result = EmassClient::DashboardsApi.new.get_system_ports_protocols_summary(
|
910
|
+
options[:orgId], optional_options
|
911
|
+
)
|
912
|
+
puts to_output_hash(result).green
|
913
|
+
rescue EmassClient::ApiError => e
|
914
|
+
puts 'Exception when calling DashboardsApi->get_system_ports_protocols_summary'.red
|
915
|
+
puts to_output_hash(e)
|
916
|
+
end
|
917
|
+
|
918
|
+
# /api/dashboards/system-ports-protocols-details
|
919
|
+
desc 'ports_protocols_details', 'Get system ports & portocols details dashboard information'
|
920
|
+
def ports_protocols_details
|
921
|
+
optional_options_keys = optional_options(@_initializer).keys
|
922
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
923
|
+
|
924
|
+
result = EmassClient::DashboardsApi.new.get_system_ports_protocols_details(
|
925
|
+
options[:orgId], optional_options
|
926
|
+
)
|
927
|
+
puts to_output_hash(result).green
|
928
|
+
rescue EmassClient::ApiError => e
|
929
|
+
puts 'Exception when calling DashboardsApi->get_system_ports_protocols_details'.red
|
930
|
+
puts to_output_hash(e)
|
931
|
+
end
|
932
|
+
|
933
|
+
#--------------------------------------------------------------------------
|
934
|
+
# System CONMON Integration Status Dashboard
|
935
|
+
# /api/dashboards/system-conmon-integration-status-summary
|
936
|
+
desc 'common_integration_status_summary', 'Get system conmon integration status summary dashboard information'
|
937
|
+
def common_integration_status_summary
|
938
|
+
optional_options_keys = optional_options(@_initializer).keys
|
939
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
940
|
+
|
941
|
+
result = EmassClient::DashboardsApi.new.get_system_common_integration_status_summary(
|
942
|
+
options[:orgId], optional_options
|
943
|
+
)
|
944
|
+
puts to_output_hash(result).green
|
945
|
+
rescue EmassClient::ApiError => e
|
946
|
+
puts 'Exception when calling DashboardsApi->get_system_common_integration_status_summary'.red
|
947
|
+
puts to_output_hash(e)
|
948
|
+
end
|
949
|
+
|
950
|
+
#--------------------------------------------------------------------------
|
951
|
+
# System Associations Dashboard
|
952
|
+
# /api/dashboards/system-associations-details
|
953
|
+
desc 'associations_details', 'Get system associations details dashboard information'
|
954
|
+
def associations_details
|
955
|
+
optional_options_keys = optional_options(@_initializer).keys
|
956
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
957
|
+
|
958
|
+
result = EmassClient::DashboardsApi.new.get_system_associations_details(
|
959
|
+
options[:orgId], optional_options
|
960
|
+
)
|
961
|
+
puts to_output_hash(result).green
|
962
|
+
rescue EmassClient::ApiError => e
|
963
|
+
puts 'Exception when calling DashboardsApi->get_system_associations_details'.red
|
964
|
+
puts to_output_hash(e)
|
965
|
+
end
|
966
|
+
|
967
|
+
#--------------------------------------------------------------------------
|
968
|
+
# Users Dashboard
|
969
|
+
# /api/dashboards/user-system-assignments-details
|
970
|
+
desc 'assignments_details', 'Get user system assignments details dashboard information'
|
971
|
+
def assignments_details
|
972
|
+
optional_options_keys = optional_options(@_initializer).keys
|
973
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
974
|
+
|
975
|
+
result = EmassClient::DashboardsApi.new.get_user_system_assignments_details(
|
976
|
+
options[:orgId], optional_options
|
977
|
+
)
|
978
|
+
puts to_output_hash(result).green
|
979
|
+
rescue EmassClient::ApiError => e
|
980
|
+
puts 'Exception when calling DashboardsApi->get_user_system_assignments_details'.red
|
981
|
+
puts to_output_hash(e)
|
982
|
+
end
|
983
|
+
|
984
|
+
#--------------------------------------------------------------------------
|
985
|
+
# Privacy Compliance Dashboard
|
986
|
+
# /api/dashboards/system-privacy-summary
|
987
|
+
desc 'privacy_summary', 'Get user system privacy summary dashboard information'
|
988
|
+
def privacy_summary
|
989
|
+
optional_options_keys = optional_options(@_initializer).keys
|
990
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
991
|
+
|
992
|
+
result = EmassClient::DashboardsApi.new.get_system_privacy_summary(
|
993
|
+
options[:orgId], optional_options
|
994
|
+
)
|
995
|
+
puts to_output_hash(result).green
|
996
|
+
rescue EmassClient::ApiError => e
|
997
|
+
puts 'Exception when calling DashboardsApi->get_system_privacy_summary'.red
|
998
|
+
puts to_output_hash(e)
|
999
|
+
end
|
1000
|
+
|
1001
|
+
# /api/dashboards/va-omb-fisma-saop-summary
|
1002
|
+
desc 'fisma_saop_summary', 'Get VA OMB-FISMA SAOP summary dashboard information'
|
1003
|
+
def fisma_saop_summary
|
1004
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1005
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1006
|
+
|
1007
|
+
result = EmassClient::DashboardsApi.new.get_va_omb_fsma_saop_summary(
|
1008
|
+
options[:orgId], optional_options
|
1009
|
+
)
|
1010
|
+
puts to_output_hash(result).green
|
1011
|
+
rescue EmassClient::ApiError => e
|
1012
|
+
puts 'Exception when calling DashboardsApi->get_va_omb_fsma_saop_summary'.red
|
1013
|
+
puts to_output_hash(e).yellow
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
#--------------------------------------------------------------------------
|
1017
|
+
# System A&A Summary Dashboard
|
1018
|
+
# /api/dashboards/va-system-aa-summary
|
1019
|
+
desc 'va_aa_summary', 'Get VA system A&A summary dashboard information'
|
1020
|
+
def va_aa_summary
|
1021
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1022
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1023
|
+
|
1024
|
+
result = EmassClient::DashboardsApi.new.get_va_system_aa_summary(
|
1025
|
+
options[:orgId], optional_options
|
1026
|
+
)
|
1027
|
+
puts to_output_hash(result).green
|
1028
|
+
rescue EmassClient::ApiError => e
|
1029
|
+
puts 'Exception when calling DashboardsApi->get_va_system_aa_summary'.red
|
1030
|
+
puts to_output_hash(e).yellow
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
#--------------------------------------------------------------------------
|
1034
|
+
# System A2.0 Summary Dashboard
|
1035
|
+
# /api/dashboards/va-system-a2-summary
|
1036
|
+
desc 'va_a2_summary', 'Get VA system A2.0 summary dashboard information'
|
1037
|
+
def va_a2_summary
|
1038
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1039
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1040
|
+
|
1041
|
+
result = EmassClient::DashboardsApi.new.get_va_system_a2_summary(
|
1042
|
+
options[:orgId], optional_options
|
1043
|
+
)
|
1044
|
+
puts to_output_hash(result).green
|
1045
|
+
rescue EmassClient::ApiError => e
|
1046
|
+
puts 'Exception when calling DashboardsApi->get_va_system_a2_summary'.red
|
1047
|
+
puts to_output_hash(e).yellow
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
#--------------------------------------------------------------------------
|
1051
|
+
# System P.L. 109 Reporting Summary Dashboard
|
1052
|
+
# /api/dashboards/va-system-pl-109-reporting-summary
|
1053
|
+
desc 'va_pl_109_summary', 'Get VA System P.L. 109 reporting summary dashboard information'
|
1054
|
+
def va_pl_109_summary
|
1055
|
+
optional_options = options.clone
|
1056
|
+
optional_options.delete('orgId')
|
1057
|
+
|
1058
|
+
result = EmassClient::DashboardsApi.new.get_va_system_pl109_reporting_summary(
|
1059
|
+
options[:orgId], optional_options
|
1060
|
+
)
|
1061
|
+
puts to_output_hash(result).green
|
1062
|
+
rescue EmassClient::ApiError => e
|
1063
|
+
puts 'Exception when calling DashboardsApi->get_va_system_pl109_reporting_summary'.red
|
1064
|
+
puts to_output_hash(e).yellow
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
#--------------------------------------------------------------------------
|
1068
|
+
# FISMA Inventory Summary Dashboard
|
1069
|
+
# /api/dashboards/va-system-fisma-inventory-summary
|
1070
|
+
desc 'fisma_inventory_summary', 'Get VA system FISMA inventory summary dashboard information'
|
1071
|
+
def fisma_inventory_summary
|
1072
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1073
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1074
|
+
|
1075
|
+
result = EmassClient::DashboardsApi.new.get_va_system_fisma_invetory_summary(
|
1076
|
+
options[:orgId], optional_options
|
1077
|
+
)
|
1078
|
+
puts to_output_hash(result).green
|
1079
|
+
rescue EmassClient::ApiError => e
|
1080
|
+
puts 'Exception when calling DashboardsApi->get_va_system_fisma_invetory_summary'.red
|
1081
|
+
puts to_output_hash(e).yellow
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
# /api/dashboards/va-system-fisma-inventory-crypto-summary
|
1085
|
+
desc 'fisma_inventory_crypto_summary', 'Get VA system FISMA inventory crypto summary dashboard information'
|
1086
|
+
def fisma_inventory_crypto_summary
|
1087
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1088
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1089
|
+
|
1090
|
+
result = EmassClient::DashboardsApi.new.get_va_system_fisma_invetory_crypto_summary(
|
1091
|
+
options[:orgId], optional_options
|
1092
|
+
)
|
1093
|
+
puts to_output_hash(result).green
|
1094
|
+
rescue EmassClient::ApiError => e
|
1095
|
+
puts 'Exception when calling DashboardsApi->get_va_system_fisma_invetory_crypto_summary'.red
|
1096
|
+
puts to_output_hash(e).yellow
|
1097
|
+
end
|
1098
|
+
|
1099
|
+
#--------------------------------------------------------------------------
|
1100
|
+
# Threat Risks Dashboard
|
1101
|
+
# /api/dashboards/va-system-threat-risks-summary
|
1102
|
+
desc 'threat_risk_summary', 'Get VA System Threat Risks Summary dashboard information'
|
1103
|
+
def threat_risk_summary
|
1104
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1105
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1106
|
+
|
1107
|
+
result = EmassClient::DashboardsApi.new.get_va_system_threat_risk_summary(
|
1108
|
+
options[:orgId], optional_options
|
1109
|
+
)
|
1110
|
+
puts to_output_hash(result).green
|
1111
|
+
rescue EmassClient::ApiError => e
|
1112
|
+
puts 'Exception when calling DashboardsApi->get_va_system_threat_risk_summary'.red
|
1113
|
+
puts to_output_hash(e).yellow
|
1114
|
+
end
|
1115
|
+
|
1116
|
+
# /api/dashboards/va-system-threat-sources-details
|
1117
|
+
desc 'threat_risk_details', 'Get VA System Threat Sources Details dashboard information'
|
1118
|
+
def threat_risk_details
|
1119
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1120
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1121
|
+
|
1122
|
+
result = EmassClient::DashboardsApi.new.get_va_system_threat_source_details(
|
1123
|
+
options[:orgId], optional_options
|
1124
|
+
)
|
1125
|
+
puts to_output_hash(result).green
|
1126
|
+
rescue EmassClient::ApiError => e
|
1127
|
+
puts 'Exception when calling DashboardsApi->get_va_system_threat_source_details'.red
|
1128
|
+
puts to_output_hash(e).yellow
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
# /api/dashboards/va-system-threat-architecture-details
|
1132
|
+
desc 'threat_architecture_details', 'Get VA System Threat Architecture Detail dashboard information'
|
1133
|
+
def threat_architecture_details
|
1134
|
+
optional_options_keys = optional_options(@_initializer).keys
|
1135
|
+
optional_options = to_input_hash(optional_options_keys, options)
|
1136
|
+
|
1137
|
+
result = EmassClient::DashboardsApi.new.get_va_system_threat_architecture_details(
|
1138
|
+
options[:orgId], optional_options
|
1139
|
+
)
|
1140
|
+
puts to_output_hash(result).green
|
1141
|
+
rescue EmassClient::ApiError => e
|
1142
|
+
puts 'Exception when calling DashboardsApi->get_va_system_threat_architecture_details'.red
|
1143
|
+
puts to_output_hash(e).yellow
|
1144
|
+
end
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
class Get < SubCommandBase
|
1148
|
+
desc 'test', 'Test connection to the configured eMASS server'
|
1149
|
+
subcommand 'test', Test
|
1150
|
+
|
1151
|
+
desc 'system', 'Get a system ID given name/owner, or get a system by ID'
|
1152
|
+
subcommand 'system', System
|
1153
|
+
|
1154
|
+
desc 'systems', 'Get all systems'
|
1155
|
+
subcommand 'systems', Systems
|
1156
|
+
|
1157
|
+
desc 'roles', 'Get all system roles or by category Id'
|
1158
|
+
subcommand 'roles', Roles
|
1159
|
+
|
1160
|
+
desc 'controls', 'Get system Controls'
|
1161
|
+
subcommand 'controls', Controls
|
1162
|
+
|
1163
|
+
desc 'test_results', 'Get system Test Results'
|
1164
|
+
subcommand 'test_results', TestResults
|
1165
|
+
|
1166
|
+
desc 'poams', 'Get system Poams'
|
1167
|
+
subcommand 'poams', Poams
|
1168
|
+
|
1169
|
+
desc 'milestones', 'Get system Milestones'
|
1170
|
+
subcommand 'milestones', Milestones
|
1171
|
+
|
1172
|
+
desc 'artifacts', 'Get system Artifacts'
|
1173
|
+
subcommand 'artifacts', Artifacts
|
1174
|
+
|
1175
|
+
desc 'cac', 'Get location of one or many controls in CAC'
|
1176
|
+
subcommand 'cac', CAC
|
1177
|
+
|
1178
|
+
desc 'pac', 'Get status of active workflows in a system'
|
1179
|
+
subcommand 'pac', PAC
|
1180
|
+
|
1181
|
+
desc 'cmmc', 'Get CMMC assessment information'
|
1182
|
+
subcommand 'cmmc', CMMC
|
1183
|
+
|
1184
|
+
desc 'workflow_definitions', 'Get workflow definitions in a site'
|
1185
|
+
subcommand 'workflow_definitions', WorkflowDefinitions
|
1186
|
+
|
1187
|
+
desc 'workflow_instances', 'Get workflow instance by system and/or ID in a system'
|
1188
|
+
subcommand 'workflow_instances', WorkflowInstances
|
1189
|
+
|
1190
|
+
desc 'dashboards', 'Get dashboard information'
|
1191
|
+
subcommand 'dashboards', Dashboards
|
1192
|
+
end
|
1193
|
+
end
|
1194
|
+
# rubocop:enable Naming/MethodName
|