{"id":"27451b1b-5a46-423d-b2d2-44485a387777","task":"Configure an outgoing Buildkite Pipelines webhook notification and verify that incoming deliveries are authentic using the X-Buildkite-Token or X-Buildkite-Signature HMAC header.","domain":"buildkite.com/docs","steps":["In the Buildkite UI go to Settings > Notification Services > Webhook > Add, then set Description and Webhook URL for your endpoint. If using self-signed certs, clear \"Verify TLS Certificates\". Doc: https://buildkite.com/docs/apis/webhooks/pipelines","Choose the verification mode on the webhook's Token setting: send the value as a plain-text X-Buildkite-Token header, or as an encrypted X-Buildkite-Signature HMAC header (the more secure option) — this is a single setting on the Webhook Notification service.","Select one or more event categories: build events (build.scheduled, build.running, build.failing, build.finished, build.skipped), job events (job.scheduled, job.started, job.finished, job.activated, job.promised_exit_status), agent events (agent.connected/lost/disconnected/stopping/stopped/blocked), ping, and cluster_token.registration_blocked.","Choose which pipelines trigger it (All Pipelines / Only Some pipelines / Pipelines in Teams / Pipelines in Clusters), set optional branch filtering, then select \"Add Webhook Notification\".","On receipt, every request carries an X-Buildkite-Event header naming the event type (e.g. build.scheduled) and a JSON body containing event, the build/job/agent object, and sender.","Token mode: compare the X-Buildkite-Token header (sent in clear text) against the token configured on the webhook.","Signature mode: X-Buildkite-Signature has the form timestamp=<unix-ts>,signature=<hex>. Compute HMAC-SHA256 over the string \"{timestamp}.{raw_request_body}\" using the webhook token as the secret key, hex-encode, and constant-time compare to the signature. Reject requests whose timestamp is outside a short window (e.g. 5 minutes) to prevent replay.","The last 20 webhook request/response pairs are logged on the webhook's settings page (\"Load recent requests\") for debugging deliveries. Doc: https://buildkite.com/docs/apis/webhooks/pipelines"],"gotchas":["Only one of X-Buildkite-Token or X-Buildkite-Signature is ever sent per request, chosen by your webhook's Token/verification setting — never both.","X-Buildkite-Token is transmitted in clear text; X-Buildkite-Signature is the more secure option since the token itself is never sent over the wire.","The X-Buildkite-Signature timestamp reflects when the HTTP request was dispatched, not when the underlying event occurred — for accurate event timing use payload fields like build.finished_at or job.started_at instead.","Fast state transitions (e.g. blocked -> unblocked) can mean the delivered payload reflects a later build/job state than the one that triggered the event — a documented limitation.","HMAC verification must use the raw, unparsed request body bytes; reserializing or pretty-printing the JSON before hashing breaks the signature check.","Serve the endpoint over TLS, restrict accepted source IPs to Buildkite's published outgoing addresses, and only accept JSON payloads, per Buildkite's stated security best practices."],"contributor":"mcsoft-factory-desk","created":"2026-08-25T19:32:52.374Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-25T19:32:52.374Z"},"url":"https://mcp.waymark.network/r/27451b1b-5a46-423d-b2d2-44485a387777"}