---
title: Submit a CVE webhook
description: Start an inbound CVE check with a signed webhook.
url: https://www.hacktron.ai/docs/api/automations/submit-cve-webhook
---

# Submit a CVE webhook

Send a CVE to check the repositories in an [automation](/docs/platform/automations/inbound-cve-webhook). Hacktron returns a run ID and checks the repositories in the background.

To receive events at your own endpoint, set up an [outbound webhook](/docs/platform/automations/webhooks).

## Request

`POST /automations/cve/webhook/{keyId}`

Ask Hacktron to enable inbound CVE webhooks for your organisation. Under **Settings** on the automation, open **CVE webhook**. Select **Create key** if you haven’t created one yet. Copy the webhook URL and save the signing secret when Hacktron shows it. You’ll only see the secret once.

Set `HACKTRON_CVE_WEBHOOK_URL` and `HACKTRON_CVE_WEBHOOK_SECRET` to the values from the automation. Give each event a unique `HACKTRON_CVE_EVENT_ID`, such as a UUID. Use 1 to 128 ASCII letters, digits, underscores, or hyphens. Keep the ID when you retry the event.

The examples use [Standard Webhooks](https://www.standardwebhooks.com). Install it with `npm install standardwebhooks` for Node.js or `pip install standardwebhooks requests` for Python.

:::::examples

::::tabs

:::tab[Node.js]

```js title="Request" wrap=false
import { Webhook } from 'standardwebhooks'

const webhook = new Webhook(process.env.HACKTRON_CVE_WEBHOOK_SECRET)
const body = JSON.stringify({ cve_id: 'CVE-2025-29927' })
const id = process.env.HACKTRON_CVE_EVENT_ID
if (!id) throw new Error('Set HACKTRON_CVE_EVENT_ID before sending')
const sentAt = new Date()

const response = await fetch(process.env.HACKTRON_CVE_WEBHOOK_URL, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'webhook-id': id,
    'webhook-timestamp': String(Math.floor(sentAt.getTime() / 1000)),
    'webhook-signature': webhook.sign(id, sentAt, body),
  },
  body,
})
console.log(response.status, await response.json())
```

:::

:::tab[Python]

```python title="Request" wrap=false
import json
import os
from datetime import datetime, timezone

import requests
from standardwebhooks.webhooks import Webhook

webhook = Webhook(os.environ["HACKTRON_CVE_WEBHOOK_SECRET"])
body = json.dumps({"cve_id": "CVE-2025-29927"}, separators=(",", ":"))
msg_id = os.environ["HACKTRON_CVE_EVENT_ID"]
sent_at = datetime.now(timezone.utc)

response = requests.post(
    os.environ["HACKTRON_CVE_WEBHOOK_URL"],
    data=body,
    timeout=30,
    headers={
        "Content-Type": "application/json",
        "webhook-id": msg_id,
        "webhook-timestamp": str(int(sent_at.timestamp())),
        "webhook-signature": webhook.sign(msg_id, sent_at, body),
    },
)
print(response.status_code, response.json())
```

:::

::::

```json title="Response 202 Accepted" showLineNumbers=false wrap=false
{
  "runId": "<run-id>",
  "status": "queued",
  "reason": null
}
```

:::::

### Path parameter

| Parameter | Type | Description |
| --- | --- | --- |
| `keyId` | UUID, required | The key ID at the end of the webhook URL. |

### Headers

| Parameter | Type | Description |
| --- | --- | --- |
| `Content-Type` | string, required | `application/json`. |
| `webhook-id` | string, required | A unique ID for the event, such as `msg_2b3c4d5e-6f70-4a81-92a3-b4c5d6e7f809`: 1 to 128 letters, digits, `_`, or `-`. Keep it when you retry. |
| `webhook-timestamp` | Unix seconds, required | When you send this attempt. It must be within five minutes of Hacktron's clock. |
| `webhook-signature` | string, required | `v1,` and the base64 HMAC-SHA256 signature. |

The library also comes in [C#, Go, Java, PHP, Ruby, Rust, and Elixir](https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries). To sign without it:

1. Build the string `{webhook-id}.{webhook-timestamp}.{body}` using the exact JSON you send, including whitespace.
2. Remove `whsec_` from the start of the secret and base64-decode the rest. The result is the signing key.
3. Compute the HMAC-SHA256 of the joined string with that key, and base64-encode it.
4. Send `v1,` followed by that signature in `webhook-signature`.

To retry an event, send the same `webhook-id` and body with a new timestamp and signature. Hacktron returns the original run instead of starting a second one.

### Body

Send the CVE ID as JSON. To test a running deployment as well, include its URL in `target_urls`. These are the only two fields Hacktron accepts. The automation selects the repositories and branches.

| Field | Type | Description |
| --- | --- | --- |
| `cve_id` | string, required | A public CVE ID, such as `CVE-2025-29927`. The sequence after the year has at least four digits. The full ID can be up to 32 characters. |
| `target_urls` | array of strings, optional | Up to 10 distinct HTTP or HTTPS URLs for deployments Hacktron can reach without signing in. Each URL must resolve to a public address and fit within 2,048 characters. Omit credentials, fragments, and IPv6 literal hosts. |

## Responses

### 202 Accepted

| Field | Type | Description |
| --- | --- | --- |
| `runId` | string, required | The run ID. An outbound webhook notifier on the automation receives it again as `data.run.id` in `automation.cve.finished`. |
| `status` | string, required | The run's status: `queued`, `running`, `success`, `partial`, `failed`, or `blocked`. A new run is usually `queued`, or `blocked` when your organisation is out of automation credits. |
| `reason` | string or null, required | Why the run is blocked or needs attention. |

### 400 Bad Request

Check the CVE ID, any target URLs, and the fields in the body. You can also get this response if the automation's repository or branch selection is invalid.

### 401 Unauthorized

The key ID, timestamp, or signature is wrong. Check that you signed the exact body you sent, and that your clock is within five minutes of Hacktron's.

### 403 Forbidden

The automation is turned off, or the inbound CVE webhook isn't enabled for your organisation.

### 404 Not Found

A selected application or repository is no longer available to your organisation.

### 409 Conflict

If you reused a `webhook-id`, check that the body matches the original byte for byte. Give each new event its own ID. If the error says the automation changed during the request, retry with the same ID and body.

### 413 Payload Too Large

The body is larger than 32 KB.

### 415 Unsupported Media Type

The body isn't `application/json`.

### 429 Too Many Requests

An organisation can have 5 queued or running CVE checks at once and 60 new runs per hour. A burst of requests can also hit the request rate limit. If the automation selects more than 100 repositories, narrow its scope before retrying.

## Next steps

Open the run in the automation's **Run history**. The [inbound CVE webhook guide](/docs/platform/automations/inbound-cve-webhook#review-the-results) explains each outcome.

To get the result in your own system, add an [outbound webhook](/docs/platform/automations/webhooks#events) notifier to the automation. When the check finishes, it receives an `automation.cve.finished` event whose `data.run.id` is the `runId` from this response.
