Custom webhook
Custom webhooks allow you to receive GitGuardian notifications on any server that accepts incoming json-encoded HTTP "POST" requests.
We use HMAC with sha256 as a hash function to sign the payload of our requests. The key used is a string concatenation of the timestamp and the signature token. This allows you to check that requests are coming from GitGuardian and that the payload was not altered during transport. See below how to implement the verification procedure. You can set the signature token in your settings.
The “Timestamp” field in the header counters replay attacks. If your current timestamp differs from our sending “Timestamp” by more than a few seconds, it is safer to drop the request.
A custom header can also be added to the requests from your settings to specify, for example, the environment or service.
How to create a custom webhook endpoint
- Navigate to Settings > Workspace > Integrations > Destinations > Custom webhook
For a personal workspace
-
Create a new custom webhook with the name of your webhook and the URL where you want to receive GitGuardian notifications. GitGuardian generates a default signature token for you to verify the authenticity of the webhook. The signature token can be edited, make sure to store it in a safe place as you won't be able to access it again after creating the webhook.

-
Select the events you would like to subscribe to and receive.
-
Configure the endpoint on your side to verify the incoming request and handle GitGuardian alerts.
For a business workspace
- Create a new custom webhook at team level.
- If you intend to activate the custom webhook for ALL incidents within the workspace, you should create it within the 'All-incidents team'.
- If you intend to activate the custom webhook for incidents within a particular team, you should create it within that team.
This can be done directly from the integration page:

or from the team page:

- Select the events you would like to subscribe to and receive.
- Configure the endpoint on your side to verify the incoming request and handle GitGuardian alerts.