Class: Falcon::ContainerVulnerabilitiesApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ContainerVulnerabilitiesApi

Returns a new instance of ContainerVulnerabilitiesApi.



36
37
38
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.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/container_vulnerabilities_api.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#read_combined_vulnerabilities(opts = {}) ⇒ VulnerabilitiesApiCombinedVulnerability

Retrieve vulnerability and aggregate data filtered by the provided FQL

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

  • :sort (String)

    The fields to sort the records on. Supported columns: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity]

Returns:



46
47
48
49
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 46

def read_combined_vulnerabilities(opts = {})
  data, _status_code, _headers = read_combined_vulnerabilities_with_http_info(opts)
  data
end

#read_combined_vulnerabilities_details(id, opts = {}) ⇒ VulnerabilitiesApiCombinedVulnerabilityDetails

Retrieve vulnerability details related to an image

Parameters:

  • id (String)

    Image UUID

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filters: cid,cps_rating,cve_id,cvss_score,exploited_status,exploited_status_name,is_zero_day,remediation_available,severity

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



113
114
115
116
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 113

def read_combined_vulnerabilities_details(id, opts = {})
  data, _status_code, _headers = read_combined_vulnerabilities_details_with_http_info(id, opts)
  data
end

#read_combined_vulnerabilities_details_with_http_info(id, opts = {}) ⇒ Array<(VulnerabilitiesApiCombinedVulnerabilityDetails, Integer, Hash)>

Retrieve vulnerability details related to an image

Parameters:

  • id (String)

    Image UUID

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filters: cid,cps_rating,cve_id,cvss_score,exploited_status,exploited_status_name,is_zero_day,remediation_available,severity

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
166
167
168
169
170
171
172
173
174
175
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 125

def read_combined_vulnerabilities_details_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_combined_vulnerabilities_details ...'
  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 ContainerVulnerabilitiesApi.read_combined_vulnerabilities_details"
  end
  # resource path
  local_var_path = '/container-security/combined/vulnerabilities/details/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiCombinedVulnerabilityDetails'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_combined_vulnerabilities_details",
    :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: ContainerVulnerabilitiesApi#read_combined_vulnerabilities_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_combined_vulnerabilities_info(cve_id, opts = {}) ⇒ VulnerabilitiesApiCombinedVulnerabilityInfo

Retrieve vulnerability and package related info for this customer

Parameters:

  • cve_id (String)

    Vulnerability CVE ID

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



183
184
185
186
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 183

def read_combined_vulnerabilities_info(cve_id, opts = {})
  data, _status_code, _headers = read_combined_vulnerabilities_info_with_http_info(cve_id, opts)
  data
end

#read_combined_vulnerabilities_info_with_http_info(cve_id, opts = {}) ⇒ Array<(VulnerabilitiesApiCombinedVulnerabilityInfo, Integer, Hash)>

Retrieve vulnerability and package related info for this customer

Parameters:

  • cve_id (String)

    Vulnerability CVE ID

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 194

def read_combined_vulnerabilities_info_with_http_info(cve_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_combined_vulnerabilities_info ...'
  end
  # verify the required parameter 'cve_id' is set
  if @api_client.config.client_side_validation && cve_id.nil?
    fail ArgumentError, "Missing the required parameter 'cve_id' when calling ContainerVulnerabilitiesApi.read_combined_vulnerabilities_info"
  end
  # resource path
  local_var_path = '/container-security/combined/vulnerabilities/info/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cve_id'] = cve_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] || 'VulnerabilitiesApiCombinedVulnerabilityInfo'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_combined_vulnerabilities_info",
    :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: ContainerVulnerabilitiesApi#read_combined_vulnerabilities_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_combined_vulnerabilities_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiCombinedVulnerability, Integer, Hash)>

Retrieve vulnerability and aggregate data filtered by the provided FQL

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

  • :sort (String)

    The fields to sort the records on. Supported columns: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity]

Returns:



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
102
103
104
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 58

def read_combined_vulnerabilities_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_combined_vulnerabilities ...'
  end
  # resource path
  local_var_path = '/container-security/combined/vulnerabilities/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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] || 'VulnerabilitiesApiCombinedVulnerability'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_combined_vulnerabilities",
    :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: ContainerVulnerabilitiesApi#read_combined_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_vulnerabilities_by_image_count(opts = {}) ⇒ VulnerabilitiesApiVulnByImageCount

Retrieve top x vulnerabilities with the most impacted images

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



251
252
253
254
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 251

def read_vulnerabilities_by_image_count(opts = {})
  data, _status_code, _headers = read_vulnerabilities_by_image_count_with_http_info(opts)
  data
end

#read_vulnerabilities_by_image_count_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiVulnByImageCount, Integer, Hash)>

Retrieve top x vulnerabilities with the most impacted images

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



262
263
264
265
266
267
268
269
270
271
272
273
274
275
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
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 262

def read_vulnerabilities_by_image_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerabilities_by_image_count ...'
  end
  # resource path
  local_var_path = '/container-security/combined/vulnerabilities/by-image-count/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiVulnByImageCount'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_vulnerabilities_by_image_count",
    :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: ContainerVulnerabilitiesApi#read_vulnerabilities_by_image_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_vulnerabilities_publication_date(opts = {}) ⇒ VulnerabilitiesApiVulnByPublication

Retrieve top x vulnerabilities with the most recent publication date

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



315
316
317
318
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 315

def read_vulnerabilities_publication_date(opts = {})
  data, _status_code, _headers = read_vulnerabilities_publication_date_with_http_info(opts)
  data
end

#read_vulnerabilities_publication_date_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiVulnByPublication, Integer, Hash)>

Retrieve top x vulnerabilities with the most recent publication date

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



326
327
328
329
330
331
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
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 326

def read_vulnerabilities_publication_date_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerabilities_publication_date ...'
  end
  # resource path
  local_var_path = '/container-security/combined/vulnerabilities/by-published-date/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiVulnByPublication'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_vulnerabilities_publication_date",
    :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: ContainerVulnerabilitiesApi#read_vulnerabilities_publication_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_vulnerability_count(opts = {}) ⇒ VulnerabilitiesApiVulnCount

Aggregate count of vulnerabilities

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



379
380
381
382
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 379

def read_vulnerability_count(opts = {})
  data, _status_code, _headers = read_vulnerability_count_with_http_info(opts)
  data
end

#read_vulnerability_count_by_actively_exploited(opts = {}) ⇒ VulnerabilitiesApiVulnCountByActivelyExploited

Aggregate count of vulnerabilities grouped by actively exploited

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



443
444
445
446
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 443

def read_vulnerability_count_by_actively_exploited(opts = {})
  data, _status_code, _headers = read_vulnerability_count_by_actively_exploited_with_http_info(opts)
  data
end

#read_vulnerability_count_by_actively_exploited_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiVulnCountByActivelyExploited, Integer, Hash)>

Aggregate count of vulnerabilities grouped by actively exploited

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 454

def read_vulnerability_count_by_actively_exploited_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_actively_exploited ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/vulnerabilities/count-by-actively-exploited/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiVulnCountByActivelyExploited'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_actively_exploited",
    :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_actively_exploited\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_vulnerability_count_by_cps_rating(opts = {}) ⇒ VulnerabilitiesApiVulnCountByCSPRating

Aggregate count of vulnerabilities grouped by csp_rating

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



507
508
509
510
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 507

def read_vulnerability_count_by_cps_rating(opts = {})
  data, _status_code, _headers = read_vulnerability_count_by_cps_rating_with_http_info(opts)
  data
end

#read_vulnerability_count_by_cps_rating_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiVulnCountByCSPRating, Integer, Hash)>

Aggregate count of vulnerabilities grouped by csp_rating

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 518

def read_vulnerability_count_by_cps_rating_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_cps_rating ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/vulnerabilities/count-by-cps-rating/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiVulnCountByCSPRating'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_cps_rating",
    :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_cps_rating\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_vulnerability_count_by_cvss_score(opts = {}) ⇒ VulnerabilitiesApiVulnCountByCVSSScore

Aggregate count of vulnerabilities grouped by cvss score

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



571
572
573
574
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 571

def read_vulnerability_count_by_cvss_score(opts = {})
  data, _status_code, _headers = read_vulnerability_count_by_cvss_score_with_http_info(opts)
  data
end

#read_vulnerability_count_by_cvss_score_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiVulnCountByCVSSScore, Integer, Hash)>

Aggregate count of vulnerabilities grouped by cvss score

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 582

def read_vulnerability_count_by_cvss_score_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_cvss_score ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/vulnerabilities/count-by-cvss-score/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiVulnCountByCVSSScore'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_cvss_score",
    :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_cvss_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_vulnerability_count_by_severity(opts = {}) ⇒ VulnerabilitiesApiVulnCountBySeverity

Aggregate count of vulnerabilities grouped by severity

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



635
636
637
638
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 635

def read_vulnerability_count_by_severity(opts = {})
  data, _status_code, _headers = read_vulnerability_count_by_severity_with_http_info(opts)
  data
end

#read_vulnerability_count_by_severity_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiVulnCountBySeverity, Integer, Hash)>

Aggregate count of vulnerabilities grouped by severity

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:



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
689
690
691
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 646

def read_vulnerability_count_by_severity_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_severity ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/vulnerabilities/count-by-severity/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiVulnCountBySeverity'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_severity",
    :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_severity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read_vulnerability_count_with_http_info(opts = {}) ⇒ Array<(VulnerabilitiesApiVulnCount, Integer, Hash)>

Aggregate count of vulnerabilities

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,package_name_version,registry,repository,severity,tag

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

Returns:

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

    VulnerabilitiesApiVulnCount data, response status code and response headers



390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/crimson-falcon/api/container_vulnerabilities_api.rb', line 390

def read_vulnerability_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/vulnerabilities/count/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  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] || 'VulnerabilitiesApiVulnCount'

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

  new_options = opts.merge(
    :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count",
    :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: ContainerVulnerabilitiesApi#read_vulnerability_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end