Class: Falcon::SecurityCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/security_check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SecurityCheck

Returns a new instance of SecurityCheck.



36
37
38
# File 'lib/crimson-falcon/api/security_check.rb', line 36

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/security_check.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#dismiss_affected_entity_v3(id, opts = {}) ⇒ DismissAffected

POST Dismiss Affected Entity Preform dismiss to an affected entity in a security check

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



44
45
46
47
# File 'lib/crimson-falcon/api/security_check.rb', line 44

def dismiss_affected_entity_v3(id, opts = {})
  data, _status_code, _headers = dismiss_affected_entity_v3_with_http_info(id, opts)
  data
end

#dismiss_affected_entity_v3_with_http_info(id, opts = {}) ⇒ Array<(DismissAffected, Integer, Hash)>

POST Dismiss Affected Entity Preform dismiss to an affected entity in a security check

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DismissAffected, Integer, Hash)>)

    DismissAffected data, response status code and response headers



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/crimson-falcon/api/security_check.rb', line 54

def dismiss_affected_entity_v3_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SecurityCheck.dismiss_affected_entity_v3 ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling SecurityCheck.dismiss_affected_entity_v3"
  end
  # resource path
  local_var_path = '/saas-security/entities/check-dismiss-affected/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DismissAffected'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"SecurityCheck.dismiss_affected_entity_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SecurityCheck#dismiss_affected_entity_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#dismiss_security_check_v3(id, opts = {}) ⇒ DismissSecurityCheck

POST Dismiss Security Check by ID Preform dismiss to a security check

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



108
109
110
111
# File 'lib/crimson-falcon/api/security_check.rb', line 108

def dismiss_security_check_v3(id, opts = {})
  data, _status_code, _headers = dismiss_security_check_v3_with_http_info(id, opts)
  data
end

#dismiss_security_check_v3_with_http_info(id, opts = {}) ⇒ Array<(DismissSecurityCheck, Integer, Hash)>

POST Dismiss Security Check by ID Preform dismiss to a security check

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DismissSecurityCheck, Integer, Hash)>)

    DismissSecurityCheck data, response status code and response headers



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/crimson-falcon/api/security_check.rb', line 118

def dismiss_security_check_v3_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SecurityCheck.dismiss_security_check_v3 ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling SecurityCheck.dismiss_security_check_v3"
  end
  # resource path
  local_var_path = '/saas-security/entities/check-dismiss/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DismissSecurityCheck'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"SecurityCheck.dismiss_security_check_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SecurityCheck#dismiss_security_check_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_metrics_v3(opts = {}) ⇒ GetMetrics

GET Metrics Get metrics on security checks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :status (String)

    Exposure status

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

  • :integration_id (String)

    Comma separated list of integration IDs

  • :impact (String)

    Impact

  • :compliance (Boolean)

    Compliance

  • :check_type (String)

    Check Type

Returns:



178
179
180
181
# File 'lib/crimson-falcon/api/security_check.rb', line 178

def get_metrics_v3(opts = {})
  data, _status_code, _headers = get_metrics_v3_with_http_info(opts)
  data
end

#get_metrics_v3_with_http_info(opts = {}) ⇒ Array<(GetMetrics, Integer, Hash)>

GET Metrics Get metrics on security checks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :status (String)

    Exposure status

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

  • :integration_id (String)

    Comma separated list of integration IDs

  • :impact (String)

    Impact

  • :compliance (Boolean)

    Compliance

  • :check_type (String)

    Check Type

Returns:

  • (Array<(GetMetrics, Integer, Hash)>)

    GetMetrics data, response status code and response headers



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/crimson-falcon/api/security_check.rb', line 194

def get_metrics_v3_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SecurityCheck.get_metrics_v3 ...'
  end
  allowable_values = ["Passed", "Failed", "Dismissed", "Pending", "Can't Run", "Stale"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  allowable_values = ["1", "2", "3"]
  if @api_client.config.client_side_validation && opts[:'impact'] && !allowable_values.include?(opts[:'impact'])
    fail ArgumentError, "invalid value for \"impact\", must be one of #{allowable_values}"
  end
  allowable_values = ["apps", "devices", "users", "assets", "permissions", "Adaptive Shield Check", "custom"]
  if @api_client.config.client_side_validation && opts[:'check_type'] && !allowable_values.include?(opts[:'check_type'])
    fail ArgumentError, "invalid value for \"check_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/saas-security/aggregates/check-metrics/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'integration_id'] = opts[:'integration_id'] if !opts[:'integration_id'].nil?
  query_params[:'impact'] = opts[:'impact'] if !opts[:'impact'].nil?
  query_params[:'compliance'] = opts[:'compliance'] if !opts[:'compliance'].nil?
  query_params[:'check_type'] = opts[:'check_type'] if !opts[:'check_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetMetrics'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"SecurityCheck.get_metrics_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SecurityCheck#get_metrics_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_security_check_affected_v3(id, opts = {}) ⇒ GetAffected

GET Security Check Affected Get a list of affected entities

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

Returns:



264
265
266
267
# File 'lib/crimson-falcon/api/security_check.rb', line 264

def get_security_check_affected_v3(id, opts = {})
  data, _status_code, _headers = get_security_check_affected_v3_with_http_info(id, opts)
  data
end

#get_security_check_affected_v3_with_http_info(id, opts = {}) ⇒ Array<(GetAffected, Integer, Hash)>

GET Security Check Affected Get a list of affected entities

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

Returns:

  • (Array<(GetAffected, Integer, Hash)>)

    GetAffected data, response status code and response headers



276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/crimson-falcon/api/security_check.rb', line 276

def get_security_check_affected_v3_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SecurityCheck.get_security_check_affected_v3 ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling SecurityCheck.get_security_check_affected_v3"
  end
  # resource path
  local_var_path = '/saas-security/entities/check-affected/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAffected'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"SecurityCheck.get_security_check_affected_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SecurityCheck#get_security_check_affected_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_security_check_compliance_v3(id, opts = {}) ⇒ GetSecurityCompliance

GET Compliance Get a list of compliance standards attached to a check

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



332
333
334
335
# File 'lib/crimson-falcon/api/security_check.rb', line 332

def get_security_check_compliance_v3(id, opts = {})
  data, _status_code, _headers = get_security_check_compliance_v3_with_http_info(id, opts)
  data
end

#get_security_check_compliance_v3_with_http_info(id, opts = {}) ⇒ Array<(GetSecurityCompliance, Integer, Hash)>

GET Compliance Get a list of compliance standards attached to a check

Parameters:

  • id (String)

    Security Check ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetSecurityCompliance, Integer, Hash)>)

    GetSecurityCompliance data, response status code and response headers



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# File 'lib/crimson-falcon/api/security_check.rb', line 342

def get_security_check_compliance_v3_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SecurityCheck.get_security_check_compliance_v3 ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling SecurityCheck.get_security_check_compliance_v3"
  end
  # resource path
  local_var_path = '/saas-security/entities/compliance/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetSecurityCompliance'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"SecurityCheck.get_security_check_compliance_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SecurityCheck#get_security_check_compliance_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_security_checks_v3(opts = {}) ⇒ GetSecurityChecks

GET Security Check by ID or GET List Security Checks Get a specific security check by ID or Get all security checks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    Security Check ID

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

  • :status (String)

    Exposure status

  • :integration_id (String)

    Comma separated list of integration IDs

  • :impact (String)

    Impact

  • :compliance (Boolean)

    Compliance

  • :check_type (String)

    Check Type

Returns:



403
404
405
406
# File 'lib/crimson-falcon/api/security_check.rb', line 403

def get_security_checks_v3(opts = {})
  data, _status_code, _headers = get_security_checks_v3_with_http_info(opts)
  data
end

#get_security_checks_v3_with_http_info(opts = {}) ⇒ Array<(GetSecurityChecks, Integer, Hash)>

GET Security Check by ID or GET List Security Checks Get a specific security check by ID or Get all security checks

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    Security Check ID

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

  • :status (String)

    Exposure status

  • :integration_id (String)

    Comma separated list of integration IDs

  • :impact (String)

    Impact

  • :compliance (Boolean)

    Compliance

  • :check_type (String)

    Check Type

Returns:

  • (Array<(GetSecurityChecks, Integer, Hash)>)

    GetSecurityChecks data, response status code and response headers



420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
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
# File 'lib/crimson-falcon/api/security_check.rb', line 420

def get_security_checks_v3_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SecurityCheck.get_security_checks_v3 ...'
  end
  allowable_values = ["Passed", "Failed", "Dismissed", "Pending", "Can't Run", "Stale"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  allowable_values = ["1", "2", "3"]
  if @api_client.config.client_side_validation && opts[:'impact'] && !allowable_values.include?(opts[:'impact'])
    fail ArgumentError, "invalid value for \"impact\", must be one of #{allowable_values}"
  end
  allowable_values = ["apps", "devices", "users", "assets", "permissions", "Adaptive Shield Check", "custom"]
  if @api_client.config.client_side_validation && opts[:'check_type'] && !allowable_values.include?(opts[:'check_type'])
    fail ArgumentError, "invalid value for \"check_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/saas-security/entities/checks/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'integration_id'] = opts[:'integration_id'] if !opts[:'integration_id'].nil?
  query_params[:'impact'] = opts[:'impact'] if !opts[:'impact'].nil?
  query_params[:'compliance'] = opts[:'compliance'] if !opts[:'compliance'].nil?
  query_params[:'check_type'] = opts[:'check_type'] if !opts[:'check_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetSecurityChecks'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"SecurityCheck.get_security_checks_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SecurityCheck#get_security_checks_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end