Skip to content

Alerts

Alerts by webhook

Each alert as signed JSON to an address of yours: your own tools, another chat, or an on-call system.

You need Manage on settings: the Owner or Admin role, or a role you made with it. In the dashboard, open Settings, Alerts, choose Add a webhook, give it a name, paste the address, and choose Add.

The address must start with https:// and be on the public internet: Kiyesi never sends to a private address, such as 10.0.0.5 or localhost.

Kiyesi shows the webhook’s signing secret once, starting with whsec_. Copy it into the tool that receives the webhook. If you lose it, remove the webhook and add it again.

Choose Send a test. Your address gets a message with "type": "alert.test".

A POST with Content-Type: application/json:

{
"type": "alert.open",
"id": "finding:65f0…:exposed-databases",
"severity": "critical",
"label": "Critical",
"subject": "checkout-api-prod",
"sentence": "Redis is open to the internet on port 6379",
"why": "Anyone can connect and read or wipe the data.",
"fix": "bind the port to 127.0.0.1 in docker-compose.yml, then docker compose up -d redis",
"url": "https://app.kiyesi.dev/alert/?id=…",
"acknowledge_url": "https://app.kiyesi.dev/alert/?id=…&ack=1",
"practice": false,
"sent_at": "2026-10-18T09:00:00.000Z"
}
  • type is alert.open, alert.reminder (still open), alert.recovered (the problem cleared) or alert.test.
  • id is the same for an alert’s open, reminders and recovery, so you can match them.
  • severity is critical, warning, info or ok. A reminder is always warning.
  • practice is true for a test and for a fire drill.

Answer with any 2xx status within 10 seconds. Kiyesi tries again a few times, with growing waits, if it gets no answer or another status. A 404 or 410 means the address is gone: Kiyesi stops trying it.

Each message has a Kiyesi-Signature header: t=<unix seconds>,v1=<signature>. The signature is the HMAC-SHA256, in hex, of the time, a full stop, and the body exactly as received, with your secret as the key. Read the body as raw bytes before any JSON parsing: a body parsed and written out again no longer matches.

import { createHmac, timingSafeEqual } from "node:crypto";
// header: the Kiyesi-Signature header; body: the raw body, as received.
export function fromKiyesi(header, body, secret) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=", 2)));
const t = Number(parts.t);
if (!parts.v1 || !Number.isInteger(t)) return false;
if (Math.abs(Date.now() / 1000 - t) > 300) return false; // older than 5 minutes
const want = createHmac("sha256", secret).update(`${t}.${body}`).digest("hex");
return (
parts.v1.length === want.length && timingSafeEqual(Buffer.from(parts.v1), Buffer.from(want))
);
}

Each of these is run, in its language’s own official image, against real webhooks from Kiyesi’s sender for every change: it must accept the real one and refuse a changed body, another secret, one older than 5 minutes and a broken header.

Refuse a message whose signature does not match, or whose time is more than a few minutes old.