Skip to main content

Webhook integration

The webhook integration sends a JSON POST to an HTTPS endpoint you control each time a routing workflow delivers an event to it. Use it to feed a ticketing system, a chat bridge, or a log pipeline that Guard has no direct connector for, including a SIEM. Guard has no native SIEM connectors, so a webhook receiver is the way to forward events. See Evidence exports.

Connect a webhookDirect link to Connect a webhook​

  1. In the Guard Cloud dashboard, open Settings > Integrations > Webhook.
  2. Enter the Endpoint URL, for example https://your-server.example/guard-webhook.
  3. Optionally enter a Signing secret. When it is set, Guard signs each request. See Verify the signature.
  4. Select Validate & save. Saving sends one health-check request to the endpoint, so the endpoint must be reachable and return a 2xx status first.
  5. Select Send test webhook to send another.

To change the endpoint or secret later, edit the fields and select Save changes. Guard never shows a saved secret again, and a save with the Signing secret field empty removes the stored secret, so requests become unsigned. Enter the secret every time you save.

Endpoint rulesDirect link to Endpoint rules​

RuleDetail
Schemehttps only
HostMust resolve to a public address. Names such as localhost, *.local, and *.internal, and private, loopback, and link-local addresses are rejected
CredentialsA URL with a username or password is rejected. Put authentication in the signing secret check instead
RedirectsGuard does not follow them. Point the URL at the final address
Timeout3 seconds. A slower response counts as a failed delivery
SuccessAny 2xx status. Guard keeps the status code and discards the response body

Respond quickly and do the real work after you reply, for example by queueing the event.

RequestDirect link to Request​

Guard sends POST with a JSON body and these headers:

HeaderValue
content-typeapplication/json
user-agenthol-guard-cloud/1.0
x-hol-guard-eventThe event type, for example guard.provider.health_check
x-hol-guard-timestampThe send time as an ISO 8601 string
x-hol-guard-signaturesha256= followed by a hex HMAC. Sent only when a signing secret is set

PayloadDirect link to Payload​

The body uses the guard-provider-event.v1 schema:

{
"eventType": "guard.investigation.route",
"eventVersion": "guard.incident.v1",
"generatedAt": "2026-10-23T14:05:11.482Z",
"schemaVersion": "guard-provider-event.v1",
"providerId": "webhook",
"destination": "Webhook",
"summary": "Guard blocked an unapproved package install.",
"investigationId": "inv_example",
"serviceId": null,
"workspaceId": null,
"metadata": {
"severity": "high",
"status": "active"
}
}

The values above are illustrative. The fields are:

FieldMeaning
eventTypeWhat happened. Connection checks and tests use guard.provider.health_check
eventVersionA grouping derived from the event type: guard.incident.v1 for incident or investigation events, guard.trust-drop.v1 for trust drops, guard.notification-delivery-failure.v1 for notification failures, otherwise guard.generic.v1
generatedAtWhen Guard built the payload
schemaVersionAlways guard-provider-event.v1
providerIdAlways webhook
destinationThe name of the destination
summaryA short text description
investigationIdThe investigation the event belongs to, or null
serviceId and workspaceIdThe service and workspace identifiers when the event has them, otherwise null
metadataEvent detail, such as severity and status. The keys depend on the event, so read them defensively

Before sending, Guard replaces the value of any metadata key that looks sensitive with the string REDACTED. Keys that match include names containing token, secret, password, credential, authorization, api key, private key, device id, artifact hash, command, argv, or receipt, and keys named path, cwd, directory, filename, or filepath. Do not rely on this list as the only control. Choose which events reach the endpoint with the trigger's event types and source kinds, and check Executions after you publish. See Actions for the Evidence shared settings.

Verify the signatureDirect link to Verify the signature​

When a signing secret is set, Guard computes an HMAC-SHA256 over the string <timestamp>.<raw body> with the secret as the key, and sends it as sha256=<hex digest>. The timestamp is the exact value of x-hol-guard-timestamp. Compute the HMAC over the raw bytes of the body, before any JSON parsing.

import { createHmac, timingSafeEqual } from 'node:crypto';

export function verifyGuardWebhook(rawBody, headers, secret) {
const timestamp = headers['x-hol-guard-timestamp'];
const received = headers['x-hol-guard-signature'];
if (!timestamp || !received) return false;

// Reject old requests so a captured one cannot be replayed later.
const ageMs = Math.abs(Date.now() - Date.parse(timestamp));
if (!Number.isFinite(ageMs) || ageMs > 5 * 60 * 1000) return false;

const expected =
'sha256=' +
createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex');
const a = Buffer.from(received);
const b = Buffer.from(expected);
return a.length === b.length && timingSafeEqual(a, b);
}

Return 401 for a request that fails the check. Without a signing secret, anyone who learns the URL can post to it, so set a secret for any endpoint that acts on the events.

Retries and duplicatesDirect link to Retries and duplicates​

Guard queues each delivery and retries a non-2xx response, a timeout, or a connection error with exponential backoff, starting at about 30 seconds and doubling. The default is five attempts, then the delivery is dead-lettered. See Integrations overview.

A retry can arrive after your endpoint already handled an earlier attempt that timed out. The payload has no delivery ID, so make the handler idempotent and use investigationId together with your own record of what you already processed.

TroubleshootingDirect link to Troubleshooting​

SymptomFix
Save fails with a public host errorUse a public DNS name that resolves to a public address
Save fails with a scheme errorUse https
Deliveries time outReply within 3 seconds and process the event afterward
The signature header is missingThe webhook was last saved with an empty Signing secret. Enter the secret and save again
Signature never matchesCompute over the raw body and the exact timestamp header, with no re-serialization, and check that the secret is the one saved in Guard
Test works but real events do not arriveConfirm a workflow with a webhook action is published and active. See Routing overview

NextDirect link to Next​