# Scans ## List Scans `client.vulnerabilityScanner.scans.list(ScanListParamsparams?, RequestOptionsoptions?): V4PagePaginationArray` **get** `/accounts/{account_id}/vuln_scanner/scans` Returns all scans for the account. ### Parameters - `params: ScanListParams` - `account_id?: string` Path param: Identifier. - `page?: number` Query param: Page number of paginated results. - `per_page?: number` Query param: Number of results per page. ### Returns - `ScanListResponse` - `id: string` Scan identifier. - `scan_type: "bola"` The type of vulnerability scan. - `"bola"` - `status: "created" | "scheduled" | "planning" | 3 more` Current lifecycle status of the scan. - `"created"` - `"scheduled"` - `"planning"` - `"running"` - `"finished"` - `"failed"` - `target_environment_id: string` The target environment this scan runs against. - `report?: Report | null` Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. - `report: Report` Version 1 of the BOLA vulnerability scan report. - `summary: Summary` Summary of all steps and findings. - `verdict: "ok" | "warning" | "inconclusive"` Overall verdict of the vulnerability scan. - `"ok"` - `"warning"` - `"inconclusive"` - `tests: Array` List of tests that were run. - `steps: Array` Steps that were executed. - `assertions: Array` Assertions that were made against the received response. - `description: string` Human-readable description of the assertion, explaining what was checked. - `kind: Kind` Kind of assertion. - `parameters: Parameters` Range of HTTP status codes. - `max: number` Maximum (inclusive) status code of the range. - `min: number` Minimum (inclusive) status code of the range. - `type: "http_status_within_range"` - `"http_status_within_range"` - `observed: number | null` Observed value on which the assertion was made. - `outcome: "ok" | "fail" | "inconclusive"` Outcome of the assertion. - `"ok"` - `"fail"` - `"inconclusive"` - `errors?: Array` Errors the step encountered that may explain absent or incomplete fields. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `request?: Request | null` HTTP request that was made, if any. - `credential_set: CredentialSet` Credential set that was used. - `id: string` ID of the credential set. - `role: "owner" | "attacker"` Role of the credential set. - `"owner"` - `"attacker"` - `header_names: Array` Names of headers that were sent. - `method: "GET" | "DELETE" | "PATCH" | 2 more` HTTP method. - `"GET"` - `"DELETE"` - `"PATCH"` - `"POST"` - `"PUT"` - `url: string` Exact and full URL (including host, query parameters) that was requested. - `variable_captures: Array` Variable captures requested for this step. - `json_path: string` JSONPath expression used for capture, e.g. `"$.id"`. - `name: string` Variable name, e.g. `"resource_id"`. - `body?: unknown` Request body, if any. - `response?: Response | null` HTTP response that was received, if any. - `body: Kind | UnionMember1 | UnionMember2 | UnionMember3` HTTP response body. - `Kind` No body was received. - `kind: "not_found"` - `"not_found"` - `UnionMember1` Body received but unable to read as UTF-8. Raw bytes, base64-encoded. - `contents: string` - `kind: "bytes"` - `"bytes"` - `truncated: boolean` - `UnionMember2` Body received as valid UTF-8 text but not valid JSON. - `contents: string` - `kind: "text"` - `"text"` - `truncated: boolean` - `UnionMember3` Body received as valid JSON. - `contents: string` - `kind: "json"` - `"json"` - `truncated: boolean` - `header_names: Array` Names of headers that were received. - `status: number` HTTP status code. - `status_text?: string | null` HTTP status text, if available for the status code. - `verdict: "ok" | "warning" | "inconclusive"` Verdict of this single test. - `"ok"` - `"warning"` - `"inconclusive"` - `preflight_errors?: Array` Errors that prevented step execution. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `report_schema_version: "v1"` Version of the report schema. - `"v1"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const scanListResponse of client.vulnerabilityScanner.scans.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(scanListResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "scan_type": "bola", "status": "created", "target_environment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "report": { "report": { "summary": { "verdict": "ok" }, "tests": [ { "steps": [ { "assertions": [ { "description": "description", "kind": { "parameters": { "max": 0, "min": 0 }, "type": "http_status_within_range" }, "observed": 0, "outcome": "ok" } ], "errors": [ { "description": "description", "error_code": 0 } ], "request": { "credential_set": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "role": "owner" }, "header_names": [ "string" ], "method": "GET", "url": "https://example.com", "variable_captures": [ { "json_path": "json_path", "name": "name" } ], "body": {} }, "response": { "body": { "kind": "not_found" }, "header_names": [ "string" ], "status": 0, "status_text": "status_text" } } ], "verdict": "ok", "preflight_errors": [ { "description": "description", "error_code": 0 } ] } ] }, "report_schema_version": "v1" } } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## Create Scan `client.vulnerabilityScanner.scans.create(ScanCreateParamsparams, RequestOptionsoptions?): ScanCreateResponse` **post** `/accounts/{account_id}/vuln_scanner/scans` Creates and starts a new vulnerability scan. The response may include non-fatal warnings in the `messages` array. ### Parameters - `params: ScanCreateParams` - `account_id?: string` Path param: Identifier. - `credential_sets: CredentialSets` Body param: Credential set references for a BOLA scan. The scanner uses the `owner` credentials for legitimate requests and the `attacker` credentials to attempt unauthorized access. - `attacker: string` Credential set ID for the attacker. - `owner: string` Credential set ID for the resource owner. - `open_api: string` Body param: OpenAPI schema definition for the API under test. The scanner uses this to discover endpoints and construct requests. - `scan_type: "bola"` Body param - `"bola"` - `target_environment_id: string` Body param: The target environment to scan. ### Returns - `ScanCreateResponse` - `id: string` Scan identifier. - `scan_type: "bola"` The type of vulnerability scan. - `"bola"` - `status: "created" | "scheduled" | "planning" | 3 more` Current lifecycle status of the scan. - `"created"` - `"scheduled"` - `"planning"` - `"running"` - `"finished"` - `"failed"` - `target_environment_id: string` The target environment this scan runs against. - `report?: Report | null` Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. - `report: Report` Version 1 of the BOLA vulnerability scan report. - `summary: Summary` Summary of all steps and findings. - `verdict: "ok" | "warning" | "inconclusive"` Overall verdict of the vulnerability scan. - `"ok"` - `"warning"` - `"inconclusive"` - `tests: Array` List of tests that were run. - `steps: Array` Steps that were executed. - `assertions: Array` Assertions that were made against the received response. - `description: string` Human-readable description of the assertion, explaining what was checked. - `kind: Kind` Kind of assertion. - `parameters: Parameters` Range of HTTP status codes. - `max: number` Maximum (inclusive) status code of the range. - `min: number` Minimum (inclusive) status code of the range. - `type: "http_status_within_range"` - `"http_status_within_range"` - `observed: number | null` Observed value on which the assertion was made. - `outcome: "ok" | "fail" | "inconclusive"` Outcome of the assertion. - `"ok"` - `"fail"` - `"inconclusive"` - `errors?: Array` Errors the step encountered that may explain absent or incomplete fields. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `request?: Request | null` HTTP request that was made, if any. - `credential_set: CredentialSet` Credential set that was used. - `id: string` ID of the credential set. - `role: "owner" | "attacker"` Role of the credential set. - `"owner"` - `"attacker"` - `header_names: Array` Names of headers that were sent. - `method: "GET" | "DELETE" | "PATCH" | 2 more` HTTP method. - `"GET"` - `"DELETE"` - `"PATCH"` - `"POST"` - `"PUT"` - `url: string` Exact and full URL (including host, query parameters) that was requested. - `variable_captures: Array` Variable captures requested for this step. - `json_path: string` JSONPath expression used for capture, e.g. `"$.id"`. - `name: string` Variable name, e.g. `"resource_id"`. - `body?: unknown` Request body, if any. - `response?: Response | null` HTTP response that was received, if any. - `body: Kind | UnionMember1 | UnionMember2 | UnionMember3` HTTP response body. - `Kind` No body was received. - `kind: "not_found"` - `"not_found"` - `UnionMember1` Body received but unable to read as UTF-8. Raw bytes, base64-encoded. - `contents: string` - `kind: "bytes"` - `"bytes"` - `truncated: boolean` - `UnionMember2` Body received as valid UTF-8 text but not valid JSON. - `contents: string` - `kind: "text"` - `"text"` - `truncated: boolean` - `UnionMember3` Body received as valid JSON. - `contents: string` - `kind: "json"` - `"json"` - `truncated: boolean` - `header_names: Array` Names of headers that were received. - `status: number` HTTP status code. - `status_text?: string | null` HTTP status text, if available for the status code. - `verdict: "ok" | "warning" | "inconclusive"` Verdict of this single test. - `"ok"` - `"warning"` - `"inconclusive"` - `preflight_errors?: Array` Errors that prevented step execution. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `report_schema_version: "v1"` Version of the report schema. - `"v1"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const scan = await client.vulnerabilityScanner.scans.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', credential_sets: { attacker: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', owner: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }, open_api: 'open_api', scan_type: 'bola', target_environment_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }); console.log(scan.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "scan_type": "bola", "status": "created", "target_environment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "report": { "report": { "summary": { "verdict": "ok" }, "tests": [ { "steps": [ { "assertions": [ { "description": "description", "kind": { "parameters": { "max": 0, "min": 0 }, "type": "http_status_within_range" }, "observed": 0, "outcome": "ok" } ], "errors": [ { "description": "description", "error_code": 0 } ], "request": { "credential_set": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "role": "owner" }, "header_names": [ "string" ], "method": "GET", "url": "https://example.com", "variable_captures": [ { "json_path": "json_path", "name": "name" } ], "body": {} }, "response": { "body": { "kind": "not_found" }, "header_names": [ "string" ], "status": 0, "status_text": "status_text" } } ], "verdict": "ok", "preflight_errors": [ { "description": "description", "error_code": 0 } ] } ] }, "report_schema_version": "v1" } }, "result_info": {} } ``` ## Get Scan `client.vulnerabilityScanner.scans.get(stringscanId, ScanGetParamsparams?, RequestOptionsoptions?): ScanGetResponse` **get** `/accounts/{account_id}/vuln_scanner/scans/{scan_id}` Returns a single scan by ID. ### Parameters - `scanId: string` - `params: ScanGetParams` - `account_id?: string` Identifier. ### Returns - `ScanGetResponse` - `id: string` Scan identifier. - `scan_type: "bola"` The type of vulnerability scan. - `"bola"` - `status: "created" | "scheduled" | "planning" | 3 more` Current lifecycle status of the scan. - `"created"` - `"scheduled"` - `"planning"` - `"running"` - `"finished"` - `"failed"` - `target_environment_id: string` The target environment this scan runs against. - `report?: Report | null` Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. - `report: Report` Version 1 of the BOLA vulnerability scan report. - `summary: Summary` Summary of all steps and findings. - `verdict: "ok" | "warning" | "inconclusive"` Overall verdict of the vulnerability scan. - `"ok"` - `"warning"` - `"inconclusive"` - `tests: Array` List of tests that were run. - `steps: Array` Steps that were executed. - `assertions: Array` Assertions that were made against the received response. - `description: string` Human-readable description of the assertion, explaining what was checked. - `kind: Kind` Kind of assertion. - `parameters: Parameters` Range of HTTP status codes. - `max: number` Maximum (inclusive) status code of the range. - `min: number` Minimum (inclusive) status code of the range. - `type: "http_status_within_range"` - `"http_status_within_range"` - `observed: number | null` Observed value on which the assertion was made. - `outcome: "ok" | "fail" | "inconclusive"` Outcome of the assertion. - `"ok"` - `"fail"` - `"inconclusive"` - `errors?: Array` Errors the step encountered that may explain absent or incomplete fields. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `request?: Request | null` HTTP request that was made, if any. - `credential_set: CredentialSet` Credential set that was used. - `id: string` ID of the credential set. - `role: "owner" | "attacker"` Role of the credential set. - `"owner"` - `"attacker"` - `header_names: Array` Names of headers that were sent. - `method: "GET" | "DELETE" | "PATCH" | 2 more` HTTP method. - `"GET"` - `"DELETE"` - `"PATCH"` - `"POST"` - `"PUT"` - `url: string` Exact and full URL (including host, query parameters) that was requested. - `variable_captures: Array` Variable captures requested for this step. - `json_path: string` JSONPath expression used for capture, e.g. `"$.id"`. - `name: string` Variable name, e.g. `"resource_id"`. - `body?: unknown` Request body, if any. - `response?: Response | null` HTTP response that was received, if any. - `body: Kind | UnionMember1 | UnionMember2 | UnionMember3` HTTP response body. - `Kind` No body was received. - `kind: "not_found"` - `"not_found"` - `UnionMember1` Body received but unable to read as UTF-8. Raw bytes, base64-encoded. - `contents: string` - `kind: "bytes"` - `"bytes"` - `truncated: boolean` - `UnionMember2` Body received as valid UTF-8 text but not valid JSON. - `contents: string` - `kind: "text"` - `"text"` - `truncated: boolean` - `UnionMember3` Body received as valid JSON. - `contents: string` - `kind: "json"` - `"json"` - `truncated: boolean` - `header_names: Array` Names of headers that were received. - `status: number` HTTP status code. - `status_text?: string | null` HTTP status text, if available for the status code. - `verdict: "ok" | "warning" | "inconclusive"` Verdict of this single test. - `"ok"` - `"warning"` - `"inconclusive"` - `preflight_errors?: Array` Errors that prevented step execution. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `report_schema_version: "v1"` Version of the report schema. - `"v1"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const scan = await client.vulnerabilityScanner.scans.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(scan.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "scan_type": "bola", "status": "created", "target_environment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "report": { "report": { "summary": { "verdict": "ok" }, "tests": [ { "steps": [ { "assertions": [ { "description": "description", "kind": { "parameters": { "max": 0, "min": 0 }, "type": "http_status_within_range" }, "observed": 0, "outcome": "ok" } ], "errors": [ { "description": "description", "error_code": 0 } ], "request": { "credential_set": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "role": "owner" }, "header_names": [ "string" ], "method": "GET", "url": "https://example.com", "variable_captures": [ { "json_path": "json_path", "name": "name" } ], "body": {} }, "response": { "body": { "kind": "not_found" }, "header_names": [ "string" ], "status": 0, "status_text": "status_text" } } ], "verdict": "ok", "preflight_errors": [ { "description": "description", "error_code": 0 } ] } ] }, "report_schema_version": "v1" } }, "result_info": {} } ``` ## Domain Types ### Scan List Response - `ScanListResponse` - `id: string` Scan identifier. - `scan_type: "bola"` The type of vulnerability scan. - `"bola"` - `status: "created" | "scheduled" | "planning" | 3 more` Current lifecycle status of the scan. - `"created"` - `"scheduled"` - `"planning"` - `"running"` - `"finished"` - `"failed"` - `target_environment_id: string` The target environment this scan runs against. - `report?: Report | null` Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. - `report: Report` Version 1 of the BOLA vulnerability scan report. - `summary: Summary` Summary of all steps and findings. - `verdict: "ok" | "warning" | "inconclusive"` Overall verdict of the vulnerability scan. - `"ok"` - `"warning"` - `"inconclusive"` - `tests: Array` List of tests that were run. - `steps: Array` Steps that were executed. - `assertions: Array` Assertions that were made against the received response. - `description: string` Human-readable description of the assertion, explaining what was checked. - `kind: Kind` Kind of assertion. - `parameters: Parameters` Range of HTTP status codes. - `max: number` Maximum (inclusive) status code of the range. - `min: number` Minimum (inclusive) status code of the range. - `type: "http_status_within_range"` - `"http_status_within_range"` - `observed: number | null` Observed value on which the assertion was made. - `outcome: "ok" | "fail" | "inconclusive"` Outcome of the assertion. - `"ok"` - `"fail"` - `"inconclusive"` - `errors?: Array` Errors the step encountered that may explain absent or incomplete fields. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `request?: Request | null` HTTP request that was made, if any. - `credential_set: CredentialSet` Credential set that was used. - `id: string` ID of the credential set. - `role: "owner" | "attacker"` Role of the credential set. - `"owner"` - `"attacker"` - `header_names: Array` Names of headers that were sent. - `method: "GET" | "DELETE" | "PATCH" | 2 more` HTTP method. - `"GET"` - `"DELETE"` - `"PATCH"` - `"POST"` - `"PUT"` - `url: string` Exact and full URL (including host, query parameters) that was requested. - `variable_captures: Array` Variable captures requested for this step. - `json_path: string` JSONPath expression used for capture, e.g. `"$.id"`. - `name: string` Variable name, e.g. `"resource_id"`. - `body?: unknown` Request body, if any. - `response?: Response | null` HTTP response that was received, if any. - `body: Kind | UnionMember1 | UnionMember2 | UnionMember3` HTTP response body. - `Kind` No body was received. - `kind: "not_found"` - `"not_found"` - `UnionMember1` Body received but unable to read as UTF-8. Raw bytes, base64-encoded. - `contents: string` - `kind: "bytes"` - `"bytes"` - `truncated: boolean` - `UnionMember2` Body received as valid UTF-8 text but not valid JSON. - `contents: string` - `kind: "text"` - `"text"` - `truncated: boolean` - `UnionMember3` Body received as valid JSON. - `contents: string` - `kind: "json"` - `"json"` - `truncated: boolean` - `header_names: Array` Names of headers that were received. - `status: number` HTTP status code. - `status_text?: string | null` HTTP status text, if available for the status code. - `verdict: "ok" | "warning" | "inconclusive"` Verdict of this single test. - `"ok"` - `"warning"` - `"inconclusive"` - `preflight_errors?: Array` Errors that prevented step execution. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `report_schema_version: "v1"` Version of the report schema. - `"v1"` ### Scan Create Response - `ScanCreateResponse` - `id: string` Scan identifier. - `scan_type: "bola"` The type of vulnerability scan. - `"bola"` - `status: "created" | "scheduled" | "planning" | 3 more` Current lifecycle status of the scan. - `"created"` - `"scheduled"` - `"planning"` - `"running"` - `"finished"` - `"failed"` - `target_environment_id: string` The target environment this scan runs against. - `report?: Report | null` Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. - `report: Report` Version 1 of the BOLA vulnerability scan report. - `summary: Summary` Summary of all steps and findings. - `verdict: "ok" | "warning" | "inconclusive"` Overall verdict of the vulnerability scan. - `"ok"` - `"warning"` - `"inconclusive"` - `tests: Array` List of tests that were run. - `steps: Array` Steps that were executed. - `assertions: Array` Assertions that were made against the received response. - `description: string` Human-readable description of the assertion, explaining what was checked. - `kind: Kind` Kind of assertion. - `parameters: Parameters` Range of HTTP status codes. - `max: number` Maximum (inclusive) status code of the range. - `min: number` Minimum (inclusive) status code of the range. - `type: "http_status_within_range"` - `"http_status_within_range"` - `observed: number | null` Observed value on which the assertion was made. - `outcome: "ok" | "fail" | "inconclusive"` Outcome of the assertion. - `"ok"` - `"fail"` - `"inconclusive"` - `errors?: Array` Errors the step encountered that may explain absent or incomplete fields. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `request?: Request | null` HTTP request that was made, if any. - `credential_set: CredentialSet` Credential set that was used. - `id: string` ID of the credential set. - `role: "owner" | "attacker"` Role of the credential set. - `"owner"` - `"attacker"` - `header_names: Array` Names of headers that were sent. - `method: "GET" | "DELETE" | "PATCH" | 2 more` HTTP method. - `"GET"` - `"DELETE"` - `"PATCH"` - `"POST"` - `"PUT"` - `url: string` Exact and full URL (including host, query parameters) that was requested. - `variable_captures: Array` Variable captures requested for this step. - `json_path: string` JSONPath expression used for capture, e.g. `"$.id"`. - `name: string` Variable name, e.g. `"resource_id"`. - `body?: unknown` Request body, if any. - `response?: Response | null` HTTP response that was received, if any. - `body: Kind | UnionMember1 | UnionMember2 | UnionMember3` HTTP response body. - `Kind` No body was received. - `kind: "not_found"` - `"not_found"` - `UnionMember1` Body received but unable to read as UTF-8. Raw bytes, base64-encoded. - `contents: string` - `kind: "bytes"` - `"bytes"` - `truncated: boolean` - `UnionMember2` Body received as valid UTF-8 text but not valid JSON. - `contents: string` - `kind: "text"` - `"text"` - `truncated: boolean` - `UnionMember3` Body received as valid JSON. - `contents: string` - `kind: "json"` - `"json"` - `truncated: boolean` - `header_names: Array` Names of headers that were received. - `status: number` HTTP status code. - `status_text?: string | null` HTTP status text, if available for the status code. - `verdict: "ok" | "warning" | "inconclusive"` Verdict of this single test. - `"ok"` - `"warning"` - `"inconclusive"` - `preflight_errors?: Array` Errors that prevented step execution. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `report_schema_version: "v1"` Version of the report schema. - `"v1"` ### Scan Get Response - `ScanGetResponse` - `id: string` Scan identifier. - `scan_type: "bola"` The type of vulnerability scan. - `"bola"` - `status: "created" | "scheduled" | "planning" | 3 more` Current lifecycle status of the scan. - `"created"` - `"scheduled"` - `"planning"` - `"running"` - `"finished"` - `"failed"` - `target_environment_id: string` The target environment this scan runs against. - `report?: Report | null` Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. - `report: Report` Version 1 of the BOLA vulnerability scan report. - `summary: Summary` Summary of all steps and findings. - `verdict: "ok" | "warning" | "inconclusive"` Overall verdict of the vulnerability scan. - `"ok"` - `"warning"` - `"inconclusive"` - `tests: Array` List of tests that were run. - `steps: Array` Steps that were executed. - `assertions: Array` Assertions that were made against the received response. - `description: string` Human-readable description of the assertion, explaining what was checked. - `kind: Kind` Kind of assertion. - `parameters: Parameters` Range of HTTP status codes. - `max: number` Maximum (inclusive) status code of the range. - `min: number` Minimum (inclusive) status code of the range. - `type: "http_status_within_range"` - `"http_status_within_range"` - `observed: number | null` Observed value on which the assertion was made. - `outcome: "ok" | "fail" | "inconclusive"` Outcome of the assertion. - `"ok"` - `"fail"` - `"inconclusive"` - `errors?: Array` Errors the step encountered that may explain absent or incomplete fields. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `request?: Request | null` HTTP request that was made, if any. - `credential_set: CredentialSet` Credential set that was used. - `id: string` ID of the credential set. - `role: "owner" | "attacker"` Role of the credential set. - `"owner"` - `"attacker"` - `header_names: Array` Names of headers that were sent. - `method: "GET" | "DELETE" | "PATCH" | 2 more` HTTP method. - `"GET"` - `"DELETE"` - `"PATCH"` - `"POST"` - `"PUT"` - `url: string` Exact and full URL (including host, query parameters) that was requested. - `variable_captures: Array` Variable captures requested for this step. - `json_path: string` JSONPath expression used for capture, e.g. `"$.id"`. - `name: string` Variable name, e.g. `"resource_id"`. - `body?: unknown` Request body, if any. - `response?: Response | null` HTTP response that was received, if any. - `body: Kind | UnionMember1 | UnionMember2 | UnionMember3` HTTP response body. - `Kind` No body was received. - `kind: "not_found"` - `"not_found"` - `UnionMember1` Body received but unable to read as UTF-8. Raw bytes, base64-encoded. - `contents: string` - `kind: "bytes"` - `"bytes"` - `truncated: boolean` - `UnionMember2` Body received as valid UTF-8 text but not valid JSON. - `contents: string` - `kind: "text"` - `"text"` - `truncated: boolean` - `UnionMember3` Body received as valid JSON. - `contents: string` - `kind: "json"` - `"json"` - `truncated: boolean` - `header_names: Array` Names of headers that were received. - `status: number` HTTP status code. - `status_text?: string | null` HTTP status text, if available for the status code. - `verdict: "ok" | "warning" | "inconclusive"` Verdict of this single test. - `"ok"` - `"warning"` - `"inconclusive"` - `preflight_errors?: Array` Errors that prevented step execution. - `description: string` Human-readable error description. - `error_code?: number | null` Numeric error code identifying the class of error, if available. - `report_schema_version: "v1"` Version of the report schema. - `"v1"`