Skip to content

Latest commit

 

History

History
549 lines (472 loc) · 10 KB

File metadata and controls

549 lines (472 loc) · 10 KB

Vulnerability Check Endpoints

Description

Resources and operations for view vulnerability checks that can be run as a part of vulnerability content.

This document contains 4 endpoints under the Vulnerability Check tag.


1. Vulnerability Checks

Vulnerability Checks

Endpoint: GET /api/3/vulnerabilities/{id}/checks

Description

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

Operation ID: getVulnerabilityChecksForVulnerability

Parameters

Parameter 1

Name: id Location: path Type: string Required: Yes Description: The identifier of the vulnerability.

Responses

200

Description: OK Schema: ReferencesWith«VulnerabilityCheckID,Link» Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "resources": [
    "string"
  ]
}

401

Description: Unauthorized Schema: UnauthorizedError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "401"
}

404

Description: Not Found Schema: NotFoundError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "404"
}

500

Description: Internal Server Error Schema: InternalServerError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "500"
}

503

Description: Service Unavailable Schema: ServiceUnavailableError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "503"
}

Request Content-Type

  • application/json

Response Content-Type

  • application/json;charset=UTF-8

2. Checks

Checks

Endpoint: GET /api/3/vulnerability_checks

Description

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.

Operation ID: getVulnerabilityChecks

Parameters

Parameter 1

Name: search Location: query Type: string Required: No Description: Vulnerability search term to find vulnerability checks for. e.g. "ssh".

Parameter 2

Name: safe Location: query Type: boolean Required: No Description: Whether to return vulnerability checks that are considered "safe" to run. Defaults to return safe and unsafe checks.

Parameter 3

Name: potential Location: query Type: boolean Required: No Description: Whether to only return checks that result in potentially vulnerable results. Defaults to return all checks.

Parameter 4

Name: requiresCredentials Location: query Type: boolean Required: No Description: Whether to only return checks that require credentials in order to successfully execute. Defaults to return all checks.

Parameter 5

Name: unique Location: query Type: boolean Required: No Description: 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.

Parameter 6

Name: type Location: query Type: string Required: No Description: The type of vulnerability checks to return. See Check Types for all available types.

Parameter 7

Name: page Location: query Type: integer Required: No Description: The index of the page (zero-based) to retrieve.

Parameter 8

Name: size Location: query Type: integer Required: No Description: The number of records per page to retrieve.

Parameter 9

Name: sort Location: query Type: array Required: No Description: 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.

Responses

200

Description: OK Schema: PageOf«VulnerabilityCheck» Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "page": {
    "number": 6,
    "size": 10,
    "totalPages": 13,
    "totalResources": 123
  },
  "resources": [
    {
      "id": "WINDOWS-HOTFIX-MS14-009-01123281-bac0-44d8-a729-cd31c19d6bd1",
      "links": [
        {
          "href": "https://hostname:3780/api/3/...",
          "rel": "self"
        }
      ],
      "plugin": "WindowsHotfixScanner",
      "potential": false,
      "requiresCredentials": true,
      "safe": true,
      "service": false,
      "unique": false,
      "vulnerability": "windows-hotfix-ms14-009"
    }
  ]
}

401

Description: Unauthorized Schema: UnauthorizedError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "401"
}

404

Description: Not Found Schema: NotFoundError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "404"
}

500

Description: Internal Server Error Schema: InternalServerError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "500"
}

503

Description: Service Unavailable Schema: ServiceUnavailableError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "503"
}

Request Content-Type

  • application/json

Response Content-Type

  • application/json;charset=UTF-8

3. Check

Check

Endpoint: GET /api/3/vulnerability_checks/{id}

Description

Returns the vulnerability check.

Operation ID: vulnerabilityCheck

Parameters

Parameter 1

Name: id Location: path Type: string Required: Yes Description: The identifier of the vulnerability check.

Responses

200

Description: OK Schema: VulnerabilityCheck Example JSON Response:

{
  "id": "WINDOWS-HOTFIX-MS14-009-01123281-bac0-44d8-a729-cd31c19d6bd1",
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "plugin": "WindowsHotfixScanner",
  "potential": false,
  "requiresCredentials": true,
  "safe": true,
  "service": false,
  "unique": false,
  "vulnerability": "windows-hotfix-ms14-009"
}

401

Description: Unauthorized Schema: UnauthorizedError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "401"
}

404

Description: Not Found Schema: NotFoundError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "404"
}

500

Description: Internal Server Error Schema: InternalServerError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "500"
}

503

Description: Service Unavailable Schema: ServiceUnavailableError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "503"
}

Request Content-Type

  • application/json

Response Content-Type

  • application/json;charset=UTF-8

4. Check Types

Check Types

Endpoint: GET /api/3/vulnerability_checks_types

Description

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

Operation ID: getVulnerabilityCheckTypes

Responses

200

Description: OK Schema: ReferencesWith«VulnerabilityCheckTypeID,Link» Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "resources": [
    "string"
  ]
}

401

Description: Unauthorized Schema: UnauthorizedError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "401"
}

404

Description: Not Found Schema: NotFoundError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "404"
}

500

Description: Internal Server Error Schema: InternalServerError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "500"
}

503

Description: Service Unavailable Schema: ServiceUnavailableError Example JSON Response:

{
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "message": "An error has occurred.",
  "status": "503"
}

Request Content-Type

  • application/json

Response Content-Type

  • application/json;charset=UTF-8