Detected country: US
logo
API Docs
‌
‌
‌
logo

Powered by

  • Home
  • Cobalt API
  • DAST Findings

DAST Findings

4min read

Share

Get All DAST Findings

This endpoint retrieves a list of all DAST findings that belong to the organization specified in the X-Org-Token header.

HTTP Request

GET https://api.us.cobalt.io/dast/findings

URL Parameters

ParameterDefaultDescription
cursorN/AUsed for pagination. Example: https://api.us.cobalt.io/dast/findings?cursor=a1b2c3d4
limit10If specified, returns only a specified amount of findings. Example: https://api.us.cobalt.io/dast/findings?limit=5
targetN/AIf specified, returns findings scoped to this target id. Example: https://api.us.cobalt.io/dast/findings?target=dt_GZgcehapJUNh6mjNuqsE4T
scanN/AIf specified, returns findings scoped to this scan id. Example: https://api.us.cobalt.io/dast/findings?scan=dsc_GZgcehapJUNh6mjNuqsE4T
curl -X GET "https://api.us.cobalt.io/dast/findings" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN"

The above command returns JSON structured like this:

{
  "pagination": {
    "next_page": "/resource?cursor=123asdzxc",
    "prev_page": "/resource?cursor=123asdzxc"
  },
  "data": [
    {
      "resource": {
        "id": "dfi_2pF7XE2nJyP3i8ComjVXj3",
        "target_id": "dt_GZgcehapJUNh6mjNuqsE4T",
        "scan_ids": [
          "dsc_GZgceqweJUNh6mjNuqsE4T"
        ],
        "title": "string",
        "last_found_at": "2024-07-01T10:39:31.919Z",
        "severity": "string",
        "state": "string",
        "affected_url": "string",
        "description": "string",
        "proof_of_concept": "string",
        "suggested_fix": "string",
        "http_exchanges": [
          {
            "request": "string",
            "response": "string"
          }
        ]
      }
    }
  ]
}

Response Fields

See Finding response fields


Get a DAST Finding

This endpoint retrieves a specific DAST finding that belongs to the organization specified in the X-Org-Token header.

HTTP Request

GET https://api.us.cobalt.io/dast/findings/YOUR-DAST-FINDING-IDENTIFIER

URL Parameters

ParameterDescription
YOUR-DAST-FINDING-IDENTIFIERA unique ID representing the finding. Starts with dfi_

Finding Response Fields

FieldDescription
idA unique ID representing the DAST finding. Starts with dfi_
target_idA unique ID representing the DAST target. Starts with dt_
scan_idsAn array of unique ID representing the scans that originated the vulnerability finding. Starts with dsc_
titleName of the vulnerability
last_found_atDate and time of when the vulnerability was last found, in ISO 8601 UTC format.
severitySeverity of the vulnerability finding: 10 is low. 20 is medium. 30 is high.
stateState of the vulnerability finding: [invalid, need_fix, wont_fix, valid_fix, check_fix]
affected_urlURL affected by the found vulnerability
descriptionDescription of the vulnerability.
proof_of_conceptEvidence of the vulnerability finding.
suggested_fixDescription of how to fix the vulnerability.
http_exchangesPairs of request and response of the vulnerability finding.
curl -X GET "https://api.us.cobalt.io/dast/findings/YOUR-DAST-FINDING-IDENTIFIER" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN"

The above command returns JSON structured like this:

{
  "resource": {
    "id": "dfi_2pF7XE2nJyP3i8ComjVXj3",
    "target_id": "dt_GZgcehapJUNh6mjNuqsE4T",
    "scan_ids": [
      "dsc_GZgceqweJUNh6mjNuqsE4T"
    ],
    "title": "string",
    "last_found_at": "2024-07-01T10:56:34.997Z",
    "severity": "string",
    "state": "string",
    "affected_url": "string",
    "description": "string",
    "proof_of_concept": "string",
    "suggested_fix": "string",
    "http_exchanges": [
      {
        "request": "string",
        "response": "string"
      }
    ]
  }
}

Retest DAST finding

This endpoint runs a short scan to determine if the finding can still be detected. The state of the finding will change automatically once the retest finishes. Because DAST findings are of an automated nature, retesting and passing the scan is the only way to mark it as fixed.

HTTP Request

POST https://api.us.cobalt.io/dast/findings/YOUR-DAST-FINDING-IDENTIFIER/retest

URL Parameters

ParameterDescription
YOUR-DAST-FINDING-IDENTIFIERA unique ID representing the finding. Starts with dfi_
curl -X POST "https://api.us.cobalt.io/dast/findings/YOUR-DAST-FINDING-IDENTIFIER/retest" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN"

The above command returns no data and a 204 response code when successful.


Update Finding State

This endpoint updates the current state of a DAST finding. Note that changing the state to fixed or check_fix is not possible with this endpoint. You have to use the retest endpointfor that.

HTTP Request

PATCH https://api.us.cobalt.io/dast/findings/YOUR-DAST-FINDING-IDENTIFIER

URL Parameters

ParameterDescription
YOUR-DAST-FINDING-IDENTIFIERA unique ID representing the finding. Starts with dfi_

Body

FieldDescription
stateThe desired next state of the finding. Should be one of [invalid, wont_fix, need_fix]
curl -X PATCH "https://api.us.cobalt.io/dast/findings/YOUR-DAST-FINDING-IDENTIFIER" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Content-Type: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN" \
  -d '{"state":"need_fix"}'

If successful, this command returns 200 and the updated finding

Response fields

See Finding response fields

Share