VulnerabilitiesUpdate a vulnerability

Update a vulnerability

Updates a finding's assignee, report link or custom fields. These are the only fields you can change through the API. You can't change status, severity, title, affected resources or source, and you can close a finding only in the Scrut app.

Send only the fields you want to change; fields you leave out stay as they are. assigneeEmail must belong to a user in your Scrut organization.

The response doesn't include affectedResources, tickets or mappedRisks. To get them, call GET /v1/vulnerabilities/{vulnerabilityId} with the fields parameter.

Scrut drops any other fields in the body without returning an error. If the body contains only unsupported fields, the request returns 400 with the message "value" must have at least 1 key.

curl -X PATCH "https://api.scrut.io/v1/vulnerabilities/import%23CVE-2024-1234" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7c9e6679-7425-40de-944b-e07fc1f90ae7" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -d '{
  "assigneeEmail": "admin@example.com",
  "reportLink": "https://example.com/report",
  "customFields": [
    {
      "customFieldId": "e760f5cb-3de6-49b4-a0c9-425076e033a1",
      "fieldValue": "production"
    },
    {
      "customFieldId": "3f1a2b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
      "fieldValue": {
        "id": "8d7c6b5a-4e3f-4210-9a8b-7c6d5e4f3a2b",
        "value": "no"
      }
    }
  ]
}'
{
  "data": {
    "vulnerabilityId": "import%23CVE-2024-1234",
    "title": "public s3 bucket",
    "description": "Bucket is world-readable.",
    "status": "open",
    "severity": "high",
    "source": "import",
    "assignees": [
      {
        "name": "Alex Rivera",
        "email": "admin@example.com",
        "isPrimary": true
      }
    ],
    "firstSeen": 1704067200000,
    "cveId": "cve-2024-1234",
    "reportLink": "https://example.com/report",
    "remediation": "Block public ACLs.",
    "stepsToReproduce": "Open the bucket URL.",
    "customFields": [
      {
        "customFieldId": "e760f5cb-3de6-49b4-a0c9-425076e033a1",
        "title": "Environment",
        "fieldType": "text_box",
        "options": [],
        "fieldValue": "production"
      },
      {
        "customFieldId": "3f1a2b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
        "title": "Fix verified",
        "fieldType": "single_select",
        "options": [
          {
            "id": "8d7c6b5a-4e3f-4210-9a8b-7c6d5e4f3a2b",
            "value": "no"
          }
        ],
        "fieldValue": [
          {
            "id": "8d7c6b5a-4e3f-4210-9a8b-7c6d5e4f3a2b",
            "value": "no"
          }
        ]
      }
    ]
  },
  "meta": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000"
  }
}
PATCH
/v1/vulnerabilities/{vulnerabilityId}
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

Machine access token from POST /oauth/token. Send Authorization: Bearer $SCRUT_ACCESS_TOKEN on every /v1 request.

Machine access token from POST /oauth/token. Send Authorization: Bearer $SCRUT_ACCESS_TOKEN on every /v1 request.
path
vulnerabilityIdstring
Required

Use the vulnerabilityId returned by list or get. It is already URL-encoded, so paste it as the path segment: /v1/vulnerabilities/{vulnerabilityId}. Findings created through the API use the api%23 prefix, for example api%23VUL-5672. Findings imported from CSV use import%23, for example import%23CVE-2024-1234.

Content-Typestring
Required

The media type of the request body

Options: application/json
header
Idempotency-Keystring
Required

Client-generated key identifying one logical write. 1–128 characters; letters, numbers, and . _ ~ - only. Reuse the same key and body to retry safely. Reusing a key with a different body returns 409 idempotency_key_reused. Successful 2xx responses are replayed for 24 hours.

Min length: 1 • Max length: 128 • Pattern: ^[A-Za-z0-9._~-]{1,128}$
assigneeEmailstring

Must be a valid email address. An invalid one returns 400.

Format: email
customFieldsarray

Custom field values to set. For each item, send customFieldId and fieldValue. Send fieldValue as a string for a text field. For a select field, send one option as { id, value } or several options as [{ id, value }]. The response always returns select values as an array, even when you send a single option.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). Machine access token from POST /oauth/token. Send Authorization: Bearer $SCRUT_ACCESS_TOKEN on every /v1 request.

Path Parameters

vulnerabilityIdstring
Required

Use the vulnerabilityId returned by list or get. It is already URL-encoded, so paste it as the path segment: /v1/vulnerabilities/{vulnerabilityId}. Findings created through the API use the api%23 prefix, for example api%23VUL-5672. Findings imported from CSV use import%23, for example import%23CVE-2024-1234.

Example:
import%23CVE-2024-1234

Headers

Idempotency-Keystring
Required

Client-generated key identifying one logical write. 1–128 characters; letters, numbers, and . _ ~ - only. Reuse the same key and body to retry safely. Reusing a key with a different body returns 409 idempotency_key_reused. Successful 2xx responses are replayed for 24 hours.

Example:
7c9e6679-7425-40de-944b-e07fc1f90ae7

Body

application/json
assigneeEmailstring

Must be a valid email address. An invalid one returns 400.

Example:
admin@example.com
customFieldsarray

Custom field values to set. For each item, send customFieldId and fieldValue. Send fieldValue as a string for a text field. For a select field, send one option as { id, value } or several options as [{ id, value }]. The response always returns select values as an array, even when you send a single option.

Responses

dataobject
Required
metaobject
Required