Module: Wazuh::Api::Endpoints::V4::Vulnerabilities

Included in:
Wazuh::Api::Endpoints::V4
Defined in:
lib/wazuh/api/endpoints/v4/vulnerabilities.rb

Instance Method Summary collapse

Instance Method Details

#vulnerabilities(agent_id, options = {}) ⇒ Object

Get vulnerabilities Returns the vulnerabilities of an agent

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :wait_for_complete (wait_for_complete)

    Disable timeout response

  • :offset (offset)

    First element to return in the collection

  • :limit (limit)

    Maximum number of elements to return. Although up to 100.000 can be specified, it is recommended not to exceed 500 elements. Responses may be slower the more this number is exceeded.

  • :sort (sort)

    Sort the collection by a field or fields (separated by comma). Use +/- at the beggining to list in ascending or descending order. Use '.' for nested fields. For example, 'field2' may be selected with 'field1.field2'

  • :search (search)

    Look for elements containing the specified string. To obtain a complementary search, use '-' at the beggining

  • :select (select)

    Select which fields to return (separated by comma). Use '.' for nested fields. For example, 'field2' may be selected with 'field1.field2'

  • :q (q)

    Query to filter results by. For example q=“status=active”

  • :distinct (distinct)

    Look for distinct values.

  • :architecture (architecture)

    Filter by architecture

  • :cve (cve)

    Filter by CVE

  • :name (name)

    Filter by name

  • :version (version)

    Filter by CVE version

See Also:



40
41
42
# File 'lib/wazuh/api/endpoints/v4/vulnerabilities.rb', line 40

def vulnerabilities(agent_id, options = {})
  offset_request('get', "/vulnerability/#{agent_id}", options)
end