Product update: Improved Webhook integration security

Radim Hernych
Radim Hernych Founder & maker of Ybug
May 01, 2020 3 min read
What’s in this article

We are constantly improving our integrations. This time we focused on the security of our Webhook integration.

Webhooks are powerful because they let Ybug send data to your own systems in real time. A new feedback report can trigger an internal workflow, create a ticket, update a dashboard, notify a service, or start an automation. But because webhook endpoints are usually publicly accessible URLs, it is important to verify that incoming requests are really coming from Ybug.

Why webhook security matters

Webhooks deliver data to publicly accessible URLs. They are often secured just by obscuring the endpoint URL, where every user obtains a unique URL to send webhook data to. Anyone with knowledge of the endpoint URL can send data to it.

That is usually not enough for production workflows. If your webhook endpoint creates tickets, stores customer feedback, triggers deployments, or updates internal systems, you need a way to check that the payload was sent by Ybug and was not forged by somebody else.

New optional webhook signature

We have added an optional extra security layer to our webhooks. You can now specify a secret token which will be used by Ybug to compute a signature of the payload sent to your webhook endpoint. Every webhook request then contains the X-Ybug-Signature header with this signature. This way, you can verify that the webhook request really originated from Ybug.

Webhook integration settings - add a secret
Add a secret value in your Webhook settings

How signature verification works

The idea is straightforward:

  1. You configure a secret value in your Ybug Webhook integration settings.
  2. Ybug uses that secret to calculate a signature for the webhook payload.
  3. Ybug sends the signature in the X-Ybug-Signature request header.
  4. Your endpoint calculates the expected signature using the same secret and the raw request body.
  5. Your endpoint compares both signatures before processing the webhook.

If the signatures match, the request is very likely to be authentic. If they do not match, your application should reject the request and avoid processing the payload.

Practical implementation tips

  • Use a long random secret. Avoid readable passwords or reused API keys.
  • Store the secret securely. Put it in an environment variable or secret manager, not directly in source code.
  • Verify the raw request body. Do not verify a re-encoded JSON object because formatting changes can alter the signature.
  • Use a constant-time comparison. This helps avoid timing-based signature comparison issues.
  • Reject failed verification early. Return an error before creating tickets, sending notifications, or storing data.
  • Rotate secrets when needed. If a URL or secret may have been exposed, generate a new secret and update your endpoint.

Example: secure feedback ingestion

Imagine you use Ybug webhooks to create issues in an internal system. Without signature verification, anyone who discovers the endpoint URL could send fake feedback data. With the secret and X-Ybug-Signature header enabled, your endpoint can verify the request before creating anything.

This protects your internal workflow from noise and keeps your webhook endpoint safer even though it is reachable from the internet.

When should you enable webhook signatures?

We recommend enabling signatures whenever your webhook endpoint does more than log a simple notification. It is especially important if the webhook:

  • creates or updates records in your database,
  • opens tickets in a project management tool,
  • triggers alerts, emails, or automation,
  • stores user-submitted content,
  • connects to internal systems.

Please read our documentation to learn more about configuring and verifying webhook signatures.

Frequently asked questions

What is X-Ybug-Signature?

X-Ybug-Signature is a request header containing a signature generated from the webhook payload and your configured secret.

Do I have to enable webhook signatures?

The signature is optional, but it is strongly recommended for production endpoints or any webhook that creates records, triggers automation, or writes to internal systems.

What should my endpoint do when signature verification fails?

Reject the request before processing the payload. Do not create tickets, store data, or trigger downstream automation from an unverified webhook.

Ready to simplify
how your team works?

Join agencies, startups, and developers using Ybug to collect clear, actionable reports – with full context, fewer delays, and no disruption to your workflow.

Start free trial

No credit card required