Submit a CVE webhook
Send a CVE to check the repositories in an automation. Hacktron returns a run ID and checks the repositories in the background.
To receive events at your own endpoint, set up an outbound webhook.
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. Install it with npm install standardwebhooks for Node.js or pip install standardwebhooks requests for Python.
Path parameter
| Parameter | Description |
|---|---|
keyIdUUID, required | The key ID at the end of the webhook URL. |
Headers
| Parameter | Description |
|---|---|
Content-Typestring, required | application/json. |
webhook-idstring, 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-timestampUnix seconds, required | When you send this attempt. It must be within five minutes of Hacktron’s clock. |
webhook-signaturestring, required | v1, and the base64 HMAC-SHA256 signature. |
The library also comes in C#, Go, Java, PHP, Ruby, Rust, and Elixir. To sign without it:
- Build the string
{webhook-id}.{webhook-timestamp}.{body}using the exact JSON you send, including whitespace. - Remove
whsec_from the start of the secret and base64-decode the rest. The result is the signing key. - Compute the HMAC-SHA256 of the joined string with that key, and base64-encode it.
- Send
v1,followed by that signature inwebhook-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 | Description |
|---|---|
cve_idstring, required | A public CVE ID, such as CVE-. The sequence after the year has at least four digits. The full ID can be up to 32 characters. |
target_urlsarray 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 | Description |
|---|---|
runIdstring, required | The run ID. An outbound webhook notifier on the automation receives it again as data.run.id in automation.cve.finished. |
statusstring, 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. |
reasonstring 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 explains each outcome.
To get the result in your own system, add an outbound webhook 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.