Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Latest commit

 

History

History
216 lines (153 loc) · 9.11 KB

VulnerabilityCheckApi.md

File metadata and controls

216 lines (153 loc) · 9.11 KB

rapid7vmconsole.VulnerabilityCheckApi

All URIs are relative to https://localhost:3780

Method HTTP request Description
get_vulnerability_check_types GET /api/3/vulnerability_checks_types Check Types
get_vulnerability_checks GET /api/3/vulnerability_checks Checks
get_vulnerability_checks_for_vulnerability GET /api/3/vulnerabilities/{id}/checks Vulnerability Checks
vulnerability_check GET /api/3/vulnerability_checks/{id} Check

get_vulnerability_check_types

ReferencesWithVulnerabilityCheckTypeIDLink get_vulnerability_check_types()

Check Types

Returns the vulnerability check types. The type groups related vulnerability checks by their purpose, property, or related characteristic.

Example

from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.VulnerabilityCheckApi()

try:
    # Check Types
    api_response = api_instance.get_vulnerability_check_types()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityCheckApi->get_vulnerability_check_types: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ReferencesWithVulnerabilityCheckTypeIDLink

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_vulnerability_checks

PageOfVulnerabilityCheck get_vulnerability_checks(search=search, safe=safe, potential=potential, requires_credentials=requires_credentials, unique=unique, type=type, page=page, size=size, sort=sort)

Checks

Returns vulnerability checks. Optional search and filtering parameters may be supplied to refine the results. Searching allows full text search of the vulnerability details a check is related to.

Example

from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.VulnerabilityCheckApi()
search = 'search_example' # str | Vulnerability search term to find vulnerability checks for. e.g. `\"ssh\"`. (optional)
safe = true # bool | Whether to return vulnerability checks that are considered \"safe\" to run. Defaults to return safe and unsafe checks. (optional)
potential = true # bool | Whether to only return checks that result in potentially vulnerable results. Defaults to return all checks. (optional)
requires_credentials = true # bool | Whether to only return checks that require credentials in order to successfully execute. Defaults to return all checks. (optional)
unique = true # bool | Whether to only return checks that guarantee to be executed once-and-only once on a host resulting in a unique result. False returns checks that can result in multiple occurrences of the same vulnerability on a host. (optional)
type = 'type_example' # str | The type of vulnerability checks to return. See <a href=\"#operation/vulnerabilityCheckTypesUsingGET\">Check Types</a> for all available types. (optional)
page = 0 # int | The index of the page (zero-based) to retrieve. (optional) (default to 0)
size = 10 # int | The number of records per page to retrieve. (optional) (default to 10)
sort = ['sort_example'] # list[str] | The criteria to sort the records by, in the format: `property[,ASC|DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters. (optional)

try:
    # Checks
    api_response = api_instance.get_vulnerability_checks(search=search, safe=safe, potential=potential, requires_credentials=requires_credentials, unique=unique, type=type, page=page, size=size, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityCheckApi->get_vulnerability_checks: %s\n" % e)

Parameters

Name Type Description Notes
search str Vulnerability search term to find vulnerability checks for. e.g. `&quot;ssh&quot;`. [optional]
safe bool Whether to return vulnerability checks that are considered &quot;safe&quot; to run. Defaults to return safe and unsafe checks. [optional]
potential bool Whether to only return checks that result in potentially vulnerable results. Defaults to return all checks. [optional]
requires_credentials bool Whether to only return checks that require credentials in order to successfully execute. Defaults to return all checks. [optional]
unique bool Whether to only return checks that guarantee to be executed once-and-only once on a host resulting in a unique result. False returns checks that can result in multiple occurrences of the same vulnerability on a host. [optional]
type str The type of vulnerability checks to return. See <a href=&quot;#operation/vulnerabilityCheckTypesUsingGET&quot;>Check Types</a> for all available types. [optional]
page int The index of the page (zero-based) to retrieve. [optional] [default to 0]
size int The number of records per page to retrieve. [optional] [default to 10]
sort list[str] The criteria to sort the records by, in the format: `property[,ASC DESC]`. The default sort order is ascending. Multiple sort criteria can be specified using multiple sort query parameters.

Return type

PageOfVulnerabilityCheck

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_vulnerability_checks_for_vulnerability

ReferencesWithVulnerabilityCheckIDLink get_vulnerability_checks_for_vulnerability(id)

Vulnerability Checks

Returns the vulnerability checks that assess for a specific vulnerability during a scan.

Example

from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.VulnerabilityCheckApi()
id = 'id_example' # str | The identifier of the vulnerability.

try:
    # Vulnerability Checks
    api_response = api_instance.get_vulnerability_checks_for_vulnerability(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityCheckApi->get_vulnerability_checks_for_vulnerability: %s\n" % e)

Parameters

Name Type Description Notes
id str The identifier of the vulnerability.

Return type

ReferencesWithVulnerabilityCheckIDLink

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

vulnerability_check

VulnerabilityCheck vulnerability_check(id)

Check

Returns the vulnerability check.

Example

from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.VulnerabilityCheckApi()
id = 'id_example' # str | The identifier of the vulnerability check.

try:
    # Check
    api_response = api_instance.vulnerability_check(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityCheckApi->vulnerability_check: %s\n" % e)

Parameters

Name Type Description Notes
id str The identifier of the vulnerability check.

Return type

VulnerabilityCheck

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json;charset=UTF-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]