Skip to content

Commit

Permalink
Clarifying that X-GitHub-Delivery is unique per event, not per delive…
Browse files Browse the repository at this point in the history
…ry (#33184)

Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com>
  • Loading branch information
CBID2 and nguyenalex836 committed May 27, 2024
1 parent c2d169f commit ad3f828
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ If your server goes down, you should redeliver missed webhooks once your server

## Use the `X-GitHub-Delivery` header

In a replay attack, a bad actor intercepts a webhook delivery and re-sends the delivery. To protect against replay attacks, you can use the `X-GitHub-Delivery` header to ensure that each delivery is unique.
In a replay attack, a bad actor intercepts a webhook delivery and re-sends the delivery. To protect against replay attacks, you can use the `X-GitHub-Delivery` header to ensure that each delivery is unique per event.

{% note %}

Expand Down
2 changes: 1 addition & 1 deletion content/webhooks/webhook-events-and-payloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ HTTP POST payloads that are delivered to your webhook's configured URL endpoint

- `X-GitHub-Hook-ID`: The unique identifier of the webhook.
- `X-GitHub-Event`: The name of the event that triggered the delivery.
- `X-GitHub-Delivery`: A globally unique identifier (GUID) to identify the delivery.{% ifversion ghes %}
- `X-GitHub-Delivery`: A globally unique identifier (GUID) to identify the event.{% ifversion ghes %}
- `X-GitHub-Enterprise-Version`: The version of the {% data variables.product.prodname_ghe_server %} instance that sent the HTTP POST payload.
- `X-GitHub-Enterprise-Host`: The hostname of the {% data variables.product.prodname_ghe_server %} instance that sent the HTTP POST payload.{% endif %}
- `X-Hub-Signature`: This header is sent if the webhook is configured with a `secret`. This is the HMAC hex digest of the request body, and is generated using the SHA-1 hash function and the `secret` as the HMAC `key`. `X-Hub-Signature` is provided for compatibility with existing integrations. We recommend that you use the more secure `X-Hub-Signature-256` instead.
Expand Down

0 comments on commit ad3f828

Please sign in to comment.