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

Latest commit

 

History

History
383 lines (274 loc) · 15.6 KB

VulnerabilityResultApi.md

File metadata and controls

383 lines (274 loc) · 15.6 KB

rapid7vmconsole.VulnerabilityResultApi

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

Method HTTP request Description
create_vulnerability_validation POST /api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations Asset Vulnerability Validations
delete_vulnerability_validation DELETE /api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations/{validationId} Asset Vulnerability Validation
get_asset_service_vulnerabilities GET /api/3/assets/{id}/services/{protocol}/{port}/vulnerabilities Asset Service Vulnerabilities
get_asset_vulnerabilities GET /api/3/assets/{id}/vulnerabilities Asset Vulnerabilities
get_asset_vulnerability GET /api/3/assets/{id}/vulnerabilities/{vulnerabilityId} Asset Vulnerability
get_vulnerability_validation GET /api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations/{validationId} Asset Vulnerability Validation
get_vulnerability_validations GET /api/3/assets/{id}/vulnerabilities/{vulnerabilityId}/validations Asset Vulnerability Validations

create_vulnerability_validation

CreatedReferenceVulnerabilityValidationIDLink create_vulnerability_validation(id, vulnerability_id, validation=validation)

Asset Vulnerability Validations

Creates a vulnerability validation for a vulnerability on an asset. The validation signifies that the vulnerability has been confirmed exploitable by an external tool, such as <a target="_blank" rel="noopener noreferrer" href="https://www.metasploit.com\">Metasploit.

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.VulnerabilityResultApi()
id = 789 # int | The identifier of the asset.
vulnerability_id = 'vulnerability_id_example' # str | The identifier of the vulnerability.
validation = rapid7vmconsole.VulnerabilityValidationResource() # VulnerabilityValidationResource | A vulnerability validation for a vulnerability on an asset. The  validation signifies that the vulnerability has been confirmed exploitable by an external tool, such as <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.metasploit.com\">Metasploit</a>. (optional)

try:
    # Asset Vulnerability Validations
    api_response = api_instance.create_vulnerability_validation(id, vulnerability_id, validation=validation)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityResultApi->create_vulnerability_validation: %s\n" % e)

Parameters

Name Type Description Notes
id int The identifier of the asset.
vulnerability_id str The identifier of the vulnerability.
validation VulnerabilityValidationResource A vulnerability validation for a vulnerability on an asset. The validation signifies that the vulnerability has been confirmed exploitable by an external tool, such as <a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://www.metasploit.com\&quot;&gt;Metasploit&lt;/a>. [optional]

Return type

CreatedReferenceVulnerabilityValidationIDLink

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]

delete_vulnerability_validation

Links delete_vulnerability_validation(id, vulnerability_id, validation_id)

Asset Vulnerability Validation

Removes a vulnerability validation for a vulnerability from an asset.

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.VulnerabilityResultApi()
id = 789 # int | The identifier of the asset.
vulnerability_id = 'vulnerability_id_example' # str | The identifier of the vulnerability.
validation_id = 789 # int | The identifier of the vulnerability validation.

try:
    # Asset Vulnerability Validation
    api_response = api_instance.delete_vulnerability_validation(id, vulnerability_id, validation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityResultApi->delete_vulnerability_validation: %s\n" % e)

Parameters

Name Type Description Notes
id int The identifier of the asset.
vulnerability_id str The identifier of the vulnerability.
validation_id int The identifier of the vulnerability validation.

Return type

Links

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_asset_service_vulnerabilities

PageOfVulnerabilityFinding get_asset_service_vulnerabilities(id, protocol, port, page=page, size=size, sort=sort)

Asset Service Vulnerabilities

Retrieves the vulnerabilities present on a service running on an asset. A finding may be invulnerable if all instances on the service have exceptions applied.

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.VulnerabilityResultApi()
id = 789 # int | The identifier of the asset.
protocol = 'protocol_example' # str | The protocol of the service.
port = 56 # int | The port of the service.
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:
    # Asset Service Vulnerabilities
    api_response = api_instance.get_asset_service_vulnerabilities(id, protocol, port, page=page, size=size, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityResultApi->get_asset_service_vulnerabilities: %s\n" % e)

Parameters

Name Type Description Notes
id int The identifier of the asset.
protocol str The protocol of the service.
port int The port of the service.
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

PageOfVulnerabilityFinding

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_asset_vulnerabilities

PageOfVulnerabilityFinding get_asset_vulnerabilities(id, page=page, size=size, sort=sort)

Asset Vulnerabilities

Retrieves all vulnerability findings on an asset. A finding may be invulnerable if all instances have exceptions applied.

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.VulnerabilityResultApi()
id = 789 # int | The identifier of the asset.
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:
    # Asset Vulnerabilities
    api_response = api_instance.get_asset_vulnerabilities(id, page=page, size=size, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityResultApi->get_asset_vulnerabilities: %s\n" % e)

Parameters

Name Type Description Notes
id int The identifier of the asset.
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

PageOfVulnerabilityFinding

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_asset_vulnerability

VulnerabilityFinding get_asset_vulnerability(id, vulnerability_id)

Asset Vulnerability

Retrieves the details for a vulnerability finding on an asset.

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.VulnerabilityResultApi()
id = 789 # int | The identifier of the asset.
vulnerability_id = 'vulnerability_id_example' # str | The identifier of the vulnerability.

try:
    # Asset Vulnerability
    api_response = api_instance.get_asset_vulnerability(id, vulnerability_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityResultApi->get_asset_vulnerability: %s\n" % e)

Parameters

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

Return type

VulnerabilityFinding

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_validation

VulnerabilityValidationResource get_vulnerability_validation(id, vulnerability_id, validation_id)

Asset Vulnerability Validation

Returns a vulnerability validation for a vulnerability on an asset. The asset must be currently vulnerable to the validated vulnerable for the validation to be returned.

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.VulnerabilityResultApi()
id = 789 # int | The identifier of the asset.
vulnerability_id = 'vulnerability_id_example' # str | The identifier of the vulnerability.
validation_id = 789 # int | The identifier of the vulnerability validation.

try:
    # Asset Vulnerability Validation
    api_response = api_instance.get_vulnerability_validation(id, vulnerability_id, validation_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityResultApi->get_vulnerability_validation: %s\n" % e)

Parameters

Name Type Description Notes
id int The identifier of the asset.
vulnerability_id str The identifier of the vulnerability.
validation_id int The identifier of the vulnerability validation.

Return type

VulnerabilityValidationResource

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_validations

ResourcesVulnerabilityValidationResource get_vulnerability_validations(id, vulnerability_id)

Asset Vulnerability Validations

Returns all vulnerability validations for a vulnerability on an asset. The asset must be currently vulnerable to the validated vulnerable for the validation to be returned.

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.VulnerabilityResultApi()
id = 789 # int | The identifier of the asset.
vulnerability_id = 'vulnerability_id_example' # str | The identifier of the vulnerability.

try:
    # Asset Vulnerability Validations
    api_response = api_instance.get_vulnerability_validations(id, vulnerability_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VulnerabilityResultApi->get_vulnerability_validations: %s\n" % e)

Parameters

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

Return type

ResourcesVulnerabilityValidationResource

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]