servant-github-webhook: Servant combinators to facilitate writing GitHub webhooks.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This package provides servant combinators that make writing safe GitHub webhooks very simple.

It features automatic verification of the digital signatures provided by GitHub in the webhook HTTP requests as well as route dispatching based on repository event type.

[Skip to Readme]


Change log
Dependencies aeson (>=0.11), base (>=4 && <5), base16-bytestring (>=0.1), bytestring (>=0.10), cryptonite (>=0.19), github (>=0.15), github-webhooks (>=0.9), http-types (>=0.9), memory (>=0.13), servant (>=0.13), servant-server (>=0.13), string-conversions (>=0.4), text (>=1.2), transformers, unordered-containers (>=0.2), wai (>=3.2) [details]
License MIT
Copyright Jacob Thomas Errington (c) 2016-2018
Author Jacob Thomas Errington
Category Web
Home page
Bug tracker
Source repo head: git clone
Uploaded by tsani at 2019-08-21T14:48:07Z


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Readme for servant-github-webhook-

[back to package description]


Build Status Hackage servant-github-webhook servant-github-webhook

This library facilitates writing Servant routes that can safely act as GitHub webhooks.


Why use servant-github-webhook?

A webhook server needs to be publicly hosted. How can legitimate requests sent by GitHub be distinguished from (malicious) requests sent by other clients?

When a webhook is configured on a repository, a secret key is added. This key is used by GitHub to compute a signature of the request body that it sends; this signature is included in the request headers. The routing combinators in servant-github-webhook compute the signature of the received request body using the same key, and check that the signature in the request headers matches. If it does, then the request is legitimate.