Skip to main content

hookbench

Capture webhooks as fixtures, verify HMAC signatures the way each vendor means them, and replay captures at your handler while developing.

$ hookbench receive --port 8080 --secret-file secret.txt --out captured.ndjson
receiver listening on http://127.0.0.1:8080/ (Ctrl+C to stop)
verifying X-Signature against the provided secret
[1] /hook (signature_valid=True) body: {"event": "payment.succeeded", "id": 7}

$ hookbench replay captured.ndjson --url http://localhost:9000/handler --secret-file secret.txt
  #1 /hook -> 200  {"received": true}
1 webhook(s) replayed to http://localhost:9000/handler

$ hookbench verify --payload body.bin --signature "sha256=abc…" --secret whsec_test123
VALID

A webhook integration fails in exactly three ways — handler never called (exposure), signature doesn't verify (secret/serialization), handler is wrong (logic). hookbench separates them mechanically:

  • receive — a local capture receiver; when a secret is given, every request's signature verdict is recorded with the payload, and an invalid signature answers 400.
  • verify — offline single-payload check. Constant-time comparison, raw-payload and timestamped schemes (Stripe-style t=…,v1=…), freshness tolerance against replay.
  • replay — re-signs fixtures with a fresh timestamp (so your own replay doesn't trip replay protection) and POSTs them at your handler; --keep-original-signatures compares against the captured bytes as-is.

The serialization trap: signatures cover exact bytes. A proxy pretty-printing the body breaks the signature while the payload "looks the same" — fixtures store raw bodies, and verification must read the raw request body, never a parsed-and-re-dumped copy.

Python 3.11+, stdlib only.

Install: pip install hookbench — or from this repo: pip install "git+https://github.com/juzorei/hookbench#subdirectory=tools/hookbench"

The companion agent skill lives in skills/webhook-integration-testing. Skills: npx skills add juzorei/hookbench.

Metadata

Release files for hookbench 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hookbench 0.1.0
File Size Uploaded Provenance Actions
hookbench-0.1.0.tar.gz 9.1 kB With provenance Details for hookbench-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hookbench 0.1.0
File Interpreter ABI Platform Actions
hookbench-0.1.0-py3-none-any.whl Python 3 none any Details for hookbench-0.1.0-py3-none-any.whl

Total release size: 17.3 kB

Release files / hookbench-0.1.0.tar.gz

Download URL hookbench-0.1.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
afcf1e9000c10716beae898e61ce836a1217f3686027d37fe3c0f9373719dee2
BLAKE2b-256 checksum
How to use checksums
273411142a21a219e9db0d34de73289273fe6129c8419c9989d4b10ae7f6596a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / hookbench-0.1.0-py3-none-any.whl

Download URL hookbench-0.1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb878a542bfdd0496ee60712b100335212f6183847171e685979365b5815817c
BLAKE2b-256 checksum
How to use checksums
ec8ceeebc0b1fba13a55641b911294d04915c3a642d78596d3784e8cc4712542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for hookbench 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hookbench-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page